ProseMirror / prosemirror

The ProseMirror WYSIWYM editor

Home Page:http://prosemirror.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backspace (joinBackward command) breaks list weird when called on first item of nested list

andrey-skl opened this issue · comments

To reproduce,

  1. Open ProseMirror example https://prosemirror.net/examples/markdown/
  2. Paste this content in Markdown mode
* one
  * two
  1. Switch to WYSIWYG mode
  2. Put cursor at the start of first item
  3. Hit "Backspace" or click "lift out of enclosing block" toolbar button
    2023-12-19 15 12 14

Expected: the text of firs item is "lifted out" of the list:
Screenshot 2023-12-19 at 15 07 34

Actual: List gets into broken state:
Screenshot 2023-12-19 at 15 07 10

The list isn't in a broken state. It's a list item that contains another list. Markdown allows this (* * two).