Caret position after double clicking at the end of a paragraph

Hello, I have a selection/caret related question and just wondering if it’s a bug or just working as designed. Also because I noticed it to work a bit differently with Firefox and Chrome. And I understand that it can be also related to how different browsers behave regarding text selection.

Here’s an example case:

  1. Go to https://prosemirror.net.
  2. Move cursor after the “!” character in the demo editor.
  3. Double click on that position.

With Firefox: The “Like this one!” text is now shown as selected.

With Chrome: The caret won’t be visible anymore, but I think it’s somewhere between “!” character and the next paragraph. Inserting any character will now combine the “Try it out by…” text from the second paragraph to the first paragraph.

In my case I wouldn’t want users to accidentally do that kind of selection which they don’t visually see and maybe for example accidentally combining text of paragraph to a block quote. But if that’s works as designed, I guess I could do some tricks with createSelectionBetween prop to make sure to keep the selection where I want in certain cases.

1 Like