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/ · 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

After days of digging I was able to make it work in Safari by commenting this line view/viewstate.ts at main · codemirror/view · GitHub

However I am not sure if this has any other side effects and why Chrome and Safari have different behaviors on this. Could you please help check? @marijn

Not sure what happened but I am starting to feel that this thread is only visible to me? Can I get some responses please?

I have seen the thread. I’m currently working on other things and will allocate time for this when I have space. You can’t expect rapid response support on software that you’re not paying for.

Thanks for the response. Glad to learn it’s on your radar. Sorry for making you upset. I started to worry because I see threads in the discussion forum are usually get replied soon and this one isn’t for nearly a month. I thought it was blocked for some reason or so. I understand this is a free software so I tried to solve it myself first, but wasn’t lucky enough to find the root cause.

When I can fix/explain something in a few minutes, I usually do it right away. I looked into this but couldn’t figure out what was going wrong, so it went onto the stack of stuff to do when I have more time.

Thank you. This makes lots of senses. I will just wait then.

This patch seems to solve this issue.

Yes I can verify the issue is resolved by the patch. Thank you very much.