ProseMirror / prosemirror

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

Caret doesn't move to new line in code block #1388

Closed dnsv closed 1 year ago

dnsv commented 1 year ago

Steps to reproduce:

  1. Open https://prosemirror.net/ in Firefox (I'm using v114.0.1).
  2. Either delete the existing content or go to a new line in the demo editor.
  3. Write ``` and press enter. You're now in the code block.
  4. Press enter again.

Expected behavior: The caret (cursor) moves to a new line.

Actual behavior: The caret is still on the first line. The <code> element's height has grown to house 2 lines, just the caret stayed on the first one.

Additional information: It works as expected in Safari. I didn't try other browsers.

marijnh commented 1 year ago

Seems the firefox bug that caused https://github.com/ProseMirror/prosemirror/issues/1128 is not entirely fixed after all. Attached patch brings back our workaround kludge for that.

marijnh commented 1 year ago

Filed issue 1837920 on the Firefox bug tracker.