-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't workingdebugeditorminilow priority or does not affect main functionalitylow priority or does not affect main functionality
Description
Describe the bug
- When typing a slash (
/) in an empty paragraph while using a Chinese (or other IME-based) keyboard input method, the editor occasionally inserts two slashes (//) instead of just one. This behavior seems somewhat random and is more likely to occur when using an IME rather than a direct English keyboard layout.
This seems like hard to reproduce in different computers, I found out this bug in my laptop, but cannot reproduce in my desktop. Both are Windows 11.
Steps to Reproduce
- Switch the keyboard input method to Chinese (or another IME).
- Place the cursor in an empty paragraph within the editor.
- Type the slash character
/. - Notice that sometimes two slashes
//appear, even though only one slash was pressed.
Expected Behavior
Only a single slash (/) should be inserted.
Actual Behavior
Randomly, two slashes (//) end up in the editor.
Additional Information / Observations
- The bug only occurs when using an IME; with a purely English keyboard layout, typing
/seems to work correctly. - During debugging and listening to
compositionstart/compositionend, sometimes the second unexpected text input occurs aftercompositionendevent is triggered. - Attempts to delay focusing or call
view.focus()viasetTimeoutdid not resolve the issue. - This suggests that the input method may be sending two events internally (composition events, then a final input event) which causes the double insertion.
Environment
- Editor: ProseMirror
- Operating System: Windows 11
- Browser: Chrome
- Input Method: Chinese Pinyin
Screenshots / Logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdebugeditorminilow priority or does not affect main functionalitylow priority or does not affect main functionality