prosemirror-math
prosemirror-math copied to clipboard
Fix IME composition bug on Firefox
trafficstars
This bug affects all versions of the Firefox browser.
Zotero uses prosemirror-math for its note editor and this bug freezes/quits the program. For Firefox browsers, this bug will cause the IME to lose its composition target.
Steps to reproduce with the official example page:
- Open http://benrbray.com/prosemirror-math/ in a Firefox browser on Windows or MacOS (not tested on Linux)
- Click a math node to enter editing mode
- Input some non-Latin words with an IME in the math node, e.g. the MS IME for Chinese, which is built-in for Windows;
- Use left/right arrow-keys to leave the math node
- Try to input some non-Latin words again outside the math node, the IME doesn't know where is the composition target. (And in Zotero, the program may freeze or quit directly)
Windows
Test on Firefox 135:
Before:
After:
Test on Zotero (fx128):
Before:
After:
MacOS
It's even broken on MacOS before this fix:
And now the IME popup is correctly positioned.
Initially posted here: https://github.com/zotero/prosemirror-math/pull/1
-
Fix
npm run build -
Fix IME composition bug on Firefox
See also https://forums.zotero.org/discussion/100416 See also https://forums.zotero.org/discussion/101947 See also https://forums.zotero.org/discussion/118104