Skip to content

Commit

Permalink
change to setTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Dec 3, 2024
1 parent bb9318f commit 99912ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/focusComposerWithDelay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function focusComposerWithDelay(textInput: InputType | null): FocusComposerWithD
return;
}
// When the closing modal has a focused text input focus() needs a delay to properly work.
InteractionManager.runAfterInteractions(() => textInput.focus());
setTimeout(() => textInput.focus(), 0);
if (forcedSelectionRange) {
setTextInputSelection(textInput, forcedSelectionRange);
}
Expand Down

0 comments on commit 99912ca

Please sign in to comment.