prosemirror-math icon indicating copy to clipboard operation
prosemirror-math copied to clipboard

Fix IME composition bug on Firefox

Open windingwind opened this issue 11 months ago • 0 comments
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:

  1. Open http://benrbray.com/prosemirror-math/ in a Firefox browser on Windows or MacOS (not tested on Linux)
  2. Click a math node to enter editing mode
  3. 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;
  4. Use left/right arrow-keys to leave the math node
  5. 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:

image

After:

image

Test on Zotero (fx128):

Before:

image

After:

image

MacOS

It's even broken on MacOS before this fix:

image

And now the IME popup is correctly positioned.

image

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

windingwind avatar Dec 17 '24 13:12 windingwind