Why programmatic inserts don't wrap on iOS multiline TextInput, and the one-line native fix
Ran into this last week on a multiline TextInput and lost a chunk of a day to it. Writing it up in case someone else hits the same thing. The bug I've got a multiline TextInput hooked up with react-native-controlled-mentions and a suggestions dropdown above it. You type a trigger character like @ to pick a suggestion from a dropdown, and the library inserts a styled name into the text box. Short…
A developer encountered an issue with multiline TextInput not wrapping on iOS when using react-native-controlled-mentions to insert styled names into a text box. Short inserts worked fine, but once the text was long enough to push the line past the right edge, the input stopped resizing on iOS. The text was still there, selection worked, and the cursor sat where it should have, but the wrapped line rendered outside the input's clipping area.
The only solution was to set the selection range after the children update, which triggers a layout pass and resolves the clipping issue without need for remounting, focus loss, or keyboard flicker.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.