Fix a bug that trailing content disappears when using IME in Safari #185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-safari-ime-trailing-content"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is similar to #184, but occurs in a slightly different situation.
While working with ProseMirror inside a shadow DOM, I encountered an issue in Safari when using an IME environment. This pull request provides a fix for that problem.
Steps to reproduce
Expected result
Actual result
https://github.com/user-attachments/assets/561d160e-67c4-4522-bdd4-78cbaf749d8b
Conditions for occurrence
Patch contents
When using an IME within a shadow DOM in Safari, calling
flush()to insert content after the lastimgelement causes content visible during input to disappear upon confirmation. Therefore, I changed it to callflushSoon(). I don't fully understand the situation with IE-specific code, but I suspect a similar issue occurs.This change also affects cases not using shadow DOM, but
flushSoon()should still be sufficient in those scenarios.Patch
5daf445cb1solves this in a less invasive way.Thank you very much for resolving this issue.
I have confirmed that the fix by
5daf445also works in my environment.Thanks for confirming. I've tagged a 1.41.0
Pull request closed