Skip to content

Commit

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

// We are setting selection twice to trigger a scroll to the cursor on toggling to smaller composer size.
// We need the delay for setSelection to properly work for IOS.
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);
textInput.current?.setSelection(selection.start, selection.start);
}, 0);
Expand Down

0 comments on commit d80be2a

Please sign in to comment.