Skip to content

Commit

Permalink
Merge pull request #36953 from akinwale/task-36003
Browse files Browse the repository at this point in the history
fix: prevent the soft keyboard from showing when the composer is not visible
  • Loading branch information
thienlnam authored Feb 26, 2024
2 parents 2509631 + 0f5f91d commit db83d97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function ComposerWithSuggestions({
const maxComposerLines = isSmallScreenWidth ? CONST.COMPOSER.MAX_LINES_SMALL_SCREEN : CONST.COMPOSER.MAX_LINES;

const parentReportAction = lodashGet(parentReportActions, [parentReportActionID]);
const shouldAutoFocus = !modal.isVisible && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;
const shouldAutoFocus =
!modal.isVisible && isFocused && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;

const valueRef = useRef(value);
valueRef.current = value;
Expand Down

0 comments on commit db83d97

Please sign in to comment.