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
  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

Chrome seems to interpret double clicks in the space after a block as a way to select from the end of that block to the start of the next one. It behaves like this in a raw contentEditable element as well. I guess this is intentional. Too bad they don’t actually draw anything for selections like that. But I am hesitant to start adding overriding code for that to ProseMirror—maybe some people intentionally use it. You could try opening a Chromium bug about such selections being invisible (though those don’t tend to get responded to very quickly).

(A late) thanks for the reply. The case seems to be as you mentioned. Chrome, Firefox and Safari seem to handle those double clicks a bit differently, also on plain textareas. This hasn’t been a problem that any user of our editor would have mentioned, so no problem with this.