{
  "id": 1338838,
  "title": "Why programmatic inserts don't wrap on iOS multiline TextInput, and the one-line native fix",
  "url": "https://urgent.news/2026/08/16/why-programmatic-inserts-dont-wrap-on-ios-multiline-textinput-and-the",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-16T19:43:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dheerajakula/why-programmatic-inserts-dont-wrap-on-ios-multiline-textinput-and-the-one-line-native-fix-3di1"
  },
  "original_language": "en",
  "account": "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.",
  "summary": "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…",
  "key_points": [
    "iOS multiline TextInput fails to wrap long text",
    "react-native-controlled-mentions inserts styled names",
    "Setting selection range after children update fixes issue"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}