ckeditor5
ckeditor5 copied to clipboard
[Android/IME] Crash while replacing an inline image with a word
📝 Provide detailed reproduction steps (if any)
Branch ck/11438-beforeinput-ime-research-vol1.1-android.
- Put caret after a link
- Select a suggestion from the keyboard
- Select an inline image widget
- Select some suggestions from the keyboard
https://user-images.githubusercontent.com/1232187/189611972-d7e3b188-7d2a-44dd-b903-2066ce01053f.mp4
Another scenario:
- Start with GBoard
- Put caret after any word (just after it so the composition starts)
- Switch to SwiftKey keyboard
- Select an inline image widget
- Select some suggestions from the keyboard
✔️ Expected result
No crash
❌ Actual result
Crash
❓ Possible solution
Looks like we are still in composition mode (from the editor point of view) while replacing inline image with a word.
📃 Other details
- Keyboards: SwiftKey
- Language: English
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Apparently SwiftKeyboard gets stuck in the composition mode and forget to fire compositionend
.
Ideas:
- Turn off the isComposing flag when we create a fake selection (we are 100% sure this is not composition anymore).
- Or when the selection change in any way.
- Or try to do something "weird" when moving the DOM selection to the fake sel container to make all keyboards realize that something important is changing and they should cancel the composition.
Closing as part of https://github.com/ckeditor/ckeditor5/issues/12058.