You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using a Japanese IME on Android (I'm using Gboard), composition ends early when typing in empty leaves (including empty text nodes and leaves created by editor.marks).
This problem happens because the restoreDOM method of RestoreDOMManager removes the DOM text node the user is currently typing in, replacing it with the <br> from the previous render. Disabling RestoreDOM fixes the problem, although the correct solution would probably involve checking some condition inside restoreDOM to determine whether to skip undoing the mutation. I was mistaken. RestoreDOM does not seem to be the (sole) cause of this issue after all.
Description
When using a Japanese IME on Android (I'm using Gboard), composition ends early when typing in empty leaves (including empty text nodes and leaves created by
editor.marks).Recording
image.mp4
Steps
To reproduce the behavior:
Expectation
Composition should not end, and the editor should contain "は" (the result of composing "h" and "a").
Environment
slate-react: 0.114.2Context
Potentially related: #4400
This problem happens because theI was mistaken.restoreDOMmethod ofRestoreDOMManagerremoves the DOM text node the user is currently typing in, replacing it with the<br>from the previous render. DisablingRestoreDOMfixes the problem, although the correct solution would probably involve checking some condition insiderestoreDOMto determine whether to skip undoing the mutation.RestoreDOMdoes not seem to be the (sole) cause of this issue after all.