Unexpected behavior when pressing ENTER after select all doc content

Steps for reproducing:

  1. load https://prosemirror.net/
  2. select all rendered content (use ctrl+a to select it)
  3. press enter key

Expected behavior: the previously selected text should be overwritten by a new line.

Current behavior: as you can see in the attached pictures a new line was created at the end of the selected text. after_press_enter select].

Notes: If you select all content using mouse and after press ENTER , the selected text will be replaced with a new line.

Is there a chance this will be fixed? Thanks!

This patch should help with this.

Thank you for fixing this so quickly!

That patch broke createParagraphNear when the selection is a GapCursor. See this issue: createParagraphNear GapCursor is broken · Issue #1136 · ProseMirror/prosemirror · GitHub

… and it’s already fixed in prosemirror-commands v1.1.7. Thanks also from me for fixing these problems so quickly!