IME is not working properly when line wrapping in Safari

To reproduce, create a vanilla editor, and add EditorView.lineWrapping as the extension. Then enable an input method. In the editor, switch to the input method and then typing. Notice that when the cursor nears the line wrapping position (the end of the line) the input method candidate words is stopped.

Tested in Chrome and everything works fine.

Jun-04-2021 15-50-08

Thank you!

I tried to add a plain content editable div with line wrapping CSS and everything works fine in Safari, so this is probably not a Safari bug.

Also this happens on macOS 11.3.1 Safari and I was using the built-in input method provided by the OS.

Wanted to follow up on this issue. Any update would be appreciated!

To help debug, here is the simple example: codemirror-6-ime-safari - StackBlitz

Just open with Safari and use input method to enter some random characters, the bug can be reproduced.

Wonder if this is related – Decorations cause input methods not working properly · Issue #340 · codemirror/codemirror.next · GitHub

I tried to take a look at the heightmap.ts myself but found it difficult to understand how it works without context.

Wonder if I can get a response here? Or if it’s not the correct place for this type of issue I can create one in the Github issues page as well. Thanks a lot! @marijn