Commit 650728d
committed
fix: skip editor side-effects during IME composition
Typing Chinese with the Windows IME caused characters to disappear and
the cursor to jump because our custom plugins ran their update hooks
during composition: the wikilink view update calls coordsAtPos and
mutates an external menu element, the slash menu's shouldShow walks the
doc and rebuilds the menu DOM, and the markdown listener fires
setContent on the parent — each of which can interrupt the IME and make
ProseMirror discard the in-flight composition.
Skip all four call sites when view.composing is true. ProseMirror
dispatches a transaction at compositionend, so menus and parent state
catch up with the committed text on the next update.
https://claude.ai/code/session_012rsJRUue9w7sBD3J5gmKWK1 parent d4ea59d commit 650728d
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
| |||
516 | 524 | | |
517 | 525 | | |
518 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
519 | 533 | | |
520 | 534 | | |
521 | 535 | | |
| |||
0 commit comments