-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor position not updated after press ENTER key in an empty code in Firefox #1106
Comments
…newlines FIX: Fix an issue where pressing enter at the start of a line in a code block would leave the visible cursor in the wrong place on Firefox. Issue ProseMirror/prosemirror#1106
This seems to be the same Firefox bug as #1073. Attached patch tries to extend the workaround for that to also cover this, and seems to work for me. Could you give it a try? |
Thanks for your response. It's true that the attached patch covers some scenarios, but I still face this problem when press ENTER in a code node. Please see: https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L574 and https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L230 I was thinking if there a way to extend current condition to pass those situations as well. Thanks |
That's exactly what patch ProseMirror/prosemirror-view@4d067de adds handling for. Did you test with the patch? |
Thank you for your response. You are right, I do not test with the attached patch. (I checked with the attached patch from the related issue). Now, I tested with the attached patch, it seems to be okay. |
Great. I've released prosemirror-view 1.16.3 with that change. |
Steps to reproduce
Expected:
Cursor should appear on the new line
Actual:
A new line is inserted, but cursor position remains the same (the selection is also updated: if you type any text, this will be inserted on the new line)
Affected platforms
The text was updated successfully, but these errors were encountered: