Closed taylorhadden closed 2 years ago
Looks good. 👍 Thank you!
This change causes issues on Android devices using GBoard keyboard. GBoard is the buggiest software I've encountered in mass use. The worst. We'll try and work on it more over time, but we need to roll this change back or put it under a flag until we can properly work around Gboard. https://discuss.prosemirror.net/t/contenteditable-on-android-is-the-absolute-worst/3810
In v0.7.14 you can use this functionality by calling:
editor.modules.input.allowComposition()
after creating your editor.
This change fixes several issues present in typewriter when dealing with IMEs and the text composition events in general. The two cases tested were the emoji selector in Windows 10 (Windows+Period) and dictation in MacOS. Prior to this change, users would see duplicate emoji insertion in the best case, and a jumbled mess of text in the worst case with dictation. This was caused by essentially duplicate mutations being handled during
compositionupdate
andcompositionend
events.This change caches mutations while in the midst of composition. This allows the IME or other composition system to have full control over the contents of its target elements until the composition is complete (via
compositionend
). At that moment, the cached mutations are evaluated and turned into a single Delta for the entire interaction.