Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Dec 4, 2024
1 parent d80be2a commit 6542b02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Composer/implementation/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function Composer(
return;
}

// We need the delay for setSelection to properly work for IOS.
// We need the delay for setSelection to properly work for IOS in bridgeless mode due to a react native
// internal bug of dispatching the event before the component is ready for it.
// (see https://github.com/Expensify/App/pull/50520#discussion_r1861960311 for more context)
const timeoutID = setTimeout(() => {
// We are setting selection twice to trigger a scroll to the cursor on toggling to smaller composer size.
textInput.current?.setSelection((selection.start || 1) - 1, selection.start);
Expand Down

0 comments on commit 6542b02

Please sign in to comment.