memspace / zefyr

Soft and gentle rich text editing for Flutter applications.
https://zefyr-editor.gitbook.io
2.22k stars 550 forks source link

MouseCursor on links #543

Closed cgestes closed 3 years ago

cgestes commented 3 years ago

This implements hitTestChildren for RenderEditableTextLine.

This also set the mouseCursor to "click" for links and always open links on click. :D The previous behavior was hard to understand for a user. Some apps do it like this, because you probably want to open a link more than you want to edit it. To edit: just remove it and make another one. In anycase it seems like a good quickfix before we do something better.

In practice this forward events to RichText & (probably) embeds. We could use TextSpan gesture detector for handling clicks on link. Your call :)

cgestes commented 3 years ago

So just pushed a rebase, with everything figured out. It is fine to review and merge

pulyaevskiy commented 3 years ago

I've cherry-picked the hit test fix in #557 and merged. Let me know if you're planning to spend more time on the links support here per our discussion above? Otherwise we can probably close it?