I’m seeing some issues with composition in Firefox on Mac while using composition near a widget. The browser seems to get confused when moving the cursor, inserting extra characters and other odd behaviour. I am not a regular IME user, but I’m fairly certain this behaviour is incorrect, and is not the same when doing the same thing on a line with no widget.
Using this example, and using Japanese - Romaji input source with a virtual keyboard to make it easier to follow (the behaviour is the same with a physical keyboard), I recorded the following:
For comparison, here is the same on a line without a widget:
Thanks for fixing that. Unfortunately, trying the same example again (it appears as though Try CodeMirror has view 6.9.3), I’m afraid it now seems differently broken on Mac. When entering a second composition, the down arrow key gets stuck when trying to move down to an emoji in the menu, and pressing the left arrow key then causes characters to appear and other oddness.
Indeed. I was testing with special character widgets, which, because they aren’t zero-length, didn’t show this issue. Attached patch seems to help with zero-length widgets.