Skip to content

onLinkDetected invalid behavior when splitting a link over multiple lines #556

@pkaramon

Description

@pkaramon

Describe the bug
If we create a link, and then split it across many lines by pressing enter the html output shows we have a couple of seperate link elements. But:

  • on Android onLinkDetected treats those multiple links as a single one
  • on iOS we treat those links as seperate but the text attribute is invalid, it returns the link text before splitting it.

To Reproduce
Steps to reproduce the behavior:

  1. In useEditorState.ts set
  const handleLinkDetected = (state: CurrentLinkState) => {
    console.log('link detected', state);
    setCurrentLink(state);
  };
  1. Launch example app
  2. Add an example link
  3. Repeatedly press enter in the middle of the link to split it across multiple lines.
  4. On Android onLinkDetected treats those multiple links as a single one. On iOS the text attribute is wrong, it tells us the link text before splitting.

Expected behavior
On Android onLinkDetected shouldn't treat those multiple links as one. On iOS text should return substrings in the video example H, 'e', l, l, 'o`
Screenshots

Screen.Recording.2026-04-20.at.10.41.40.mov

Device (please complete the following information):

  • Device: iPhone 17, Pixel 9
  • OS: iOS 26.2, Android 16
  • Version -, API 36 "Baklava"

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions