-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Japanese IME input issue with stored marks in ProseMirror editor #1494
Comments
It appears Chrome is reporting a different selection (via |
Yes, there are cases that affect the actual editing. 2024-11-07.23.17.01.movThe video above is an example. |
I think I found a workaround for this—the kludge that already existed for an issue like this on Chrome Android also applies to desktop Chrome. Attached patch enables it there. |
Sorry for the late response. I confirmed that it is fixed in the PATCH version. Thank you for the great work you've done. |
Bug Description
When using IME to input Japanese characters with the ProseMirror editor's marks stored, the cursor is positioned to the left of the input character.
Steps to Reproduce.
2024-11-07.14.49.03.mov
Browser Used
Chrome
Expected Behavior
The cursor is positioned to the right of the character you type.
Additional Context (Optional)
I've print debugged the issue at hand, and it seems that the result of the relevant Document.getSelection method is different between Chrome and Firefox.
https://github.com/ProseMirror/prosemirror-view/blob/5c33b883d39d7d40097e1fcdf17f543d18ad502a/src/index.ts#L498-L501
Table of results of executing the relevant Document.getSelection including bold in storedMarks
https://github.com/ProseMirror/prosemirror-view/blob/5c33b883d39d7d40097e1fcdf17f543d18ad502a/src/domchange.ts#L15-L25
Modifying the above parseBetween function as follows will solve this issue, but I am not sure if this is the right way to do it.
The text was updated successfully, but these errors were encountered: