ProseMirror / prosemirror

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

Can not delete last line in code block in Firefox #1373

Closed jannschu closed 1 year ago

jannschu commented 1 year ago

Steps to reproduce:

  1. Go to https://prosemirror.net/examples/basic/
  2. Create a new code block in the editor.
  3. Press enter to create en empty line, now press backspace.

The expectated behavior is the empty line to be deleted.

Setup was Firefox 112.0.1 (fresh profile, no extensions) on macOS 13.2.1. Works with Chrome and Safari. Also works in Firefox 102.10.0, so most likely a Firefox bug? How could I search for this in the Firefox bug tracker?

Screencapture:

https://user-images.githubusercontent.com/17914/236038011-bdce0ca6-eda2-4921-8e6d-3a9e9d3a0ddd.mov

marijnh commented 1 year ago

Attached patch should help. This was a side effect of a kludge (#1128) for a Firefox bug that, it seems, has been fixed in the meantime.

thecodrr commented 1 year ago

@marijnh This issue is back. I can reproduce it reliably on Firefox 115.0.3.

marijnh commented 1 year ago

Indeed, the fix was reverted again. Attached patch fixes it in another way.