Open matsjoyce opened 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.
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?
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:
href
does fix the issue (but will also stop them being rendered as links). Unfortunately, removing thehref
cannot be done though decorations, so it will have to be done though thelinkToHtmlNode
which will then affect theHtml.toHtml
function.a
, since the only place thea
element is used is in thelinkToHtmlNode
function.Modify the JS that handles the mutation list to move the changes into the link. This can be complicated if the link contains nested markup. Going down that route results is a monstrosity like this:
This problem does not occur on Firefox.