Skip to content

Commit

Permalink
Merge pull request #56408 from software-mansion-labs/fix-focus-when-e…
Browse files Browse the repository at this point in the history
…diting-message

 Introduce temporary focus fix for Android HybridApp
  • Loading branch information
roryabraham authored Feb 5, 2025
2 parents 418bf69 + 87fbc9e commit 8aa6de8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/focusComposerWithDelay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function focusComposerWithDelay(textInput: InputType | null): FocusComposerWithD
return;
}
// When the closing modal has a focused text input focus() needs a delay to properly work.
setTimeout(() => textInput.focus(), 0);
// Setting 150ms here is a temporary workaround for the Android HybridApp. It should be reverted once we identify the real root cause of this issue: https://github.com/Expensify/App/issues/56311.
setTimeout(() => textInput.focus(), 150);
if (forcedSelectionRange) {
setTextInputSelection(textInput, forcedSelectionRange);
}
Expand Down

0 comments on commit 8aa6de8

Please sign in to comment.