Skip to content

Commit 250b392

Browse files
committed
shouldAutoFocus from live value not initialText snapshot
1 parent fa9567b commit 250b392

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function ComposerWithSuggestions({
287287

288288
const {shouldUseNarrowLayout} = useResponsiveLayout();
289289
const maxComposerLines = shouldUseNarrowLayout ? CONST.COMPOSER.MAX_LINES_SMALL_SCREEN : CONST.COMPOSER.MAX_LINES;
290-
const shouldAutoFocus = (shouldFocusInputOnScreenFocus || !!initialText) && shouldShowComposeInput && areAllModalsHidden() && isFocused;
290+
const shouldAutoFocus = (shouldFocusInputOnScreenFocus || !!value) && shouldShowComposeInput && areAllModalsHidden() && isFocused;
291291
const delayedAutoFocusRouteKeyRef = useRef<string | null>(null);
292292

293293
const valueRef = useRef(initialText);

0 commit comments

Comments
 (0)