mweiss / elm-rte-toolkit

A toolkit for creating rich text editors in Elm
https://mweiss.github.io/elm-rte-toolkit/
BSD 3-Clause "New" or "Revised" License
149 stars 14 forks source link

Cannot type after a link on Chrome #34

Open matsjoyce opened 3 years ago

matsjoyce commented 3 years ago

Steps to reproduce:

Cause: Chrome adds the text after the link, which is ignored by the editor. See https://bugs.chromium.org/p/chromium/issues/detail?id=1115085#c3 for details

Possible fix:

This problem does not occur on Firefox.

mweiss commented 3 years ago

Thanks for reporting this! I'm wary of adding special cases to the js code for browser specific bugs (although Android and mac have a few) since that can get out of hand really fast. Perhaps adding a new command is the way to go, or even waiting for Chrome to fix itself.

matsjoyce commented 3 years ago

Judging from the issue I linked, Chrome considers this to be the desired behaviour. I suppose the best way of fixing this is to add a new command and a new field to marks, so that the command can determine if the mark is a link?