ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.53k stars 334 forks source link

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

Open andrey-skl opened 7 months ago

andrey-skl commented 7 months ago

To reproduce,

  1. Open ProseMirror example https://prosemirror.net/examples/markdown/
  2. Paste this content in Markdown mode
    * one
    * two
  3. Switch to WYSIWYG mode
  4. Put cursor at the start of first item
  5. 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
marijnh commented 6 months ago

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