-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Samsung Keyboards "Predictive text" breaks editor state when autocompleting #1504
Comments
There's an attribute that is supposed to turn this off, and Safari respects it (see also #1486), but I'm not super surprised Samsung's browser would ignore that. You could try reporting both the invasive app-breaking behavior and the ignoring of that attribute as bugs via the built-in error reporting feature (but I don't really expect much of a useful response from the company). Beyond that, it may be hard to fix this. CodeMirror is kind of at the mercy of the platform, and when the platform is a crude custom browser like this, which implements their predictive text in an invasive and poorly considered way, that kind of pulls the rug from under us. |
Thanks for the fast response. I understand, unfortunately the browser in question is Chrome and the same behavior can also be observed when using CodeMirror in an Android WebView, both of which should be supporting the attribute. |
No idea. I will try to get my hands on a Samsung device to poke around at this. |
I investigated a bit more, as a previous PoC we evaluated did not exhibit the same issues and found that this behavior is only present when using |
FIX: Work around an issue with Chrome's `EditContext` that shows up when using autocompletion while composing with Samsung's virtual Android keyboard. Issue codemirror/dev#1504
This issue appears to be another symptom of #1472 . The Samsung keyboard doesn't abort its composition when the composed word is replaced, which leaves the edit context stuck in a composition that no longer reflects the text, making it impossible to properly interpret further changes originating from it. Attached patch should limit the damage from this. But it doesn't really solve the family of issues in a fundamental way. I'm considering disabling our use of |
Describe the issue
When using a Samsung device with the (unfortunately by default) enabled "Predictive text" feature, choosing an option from the autocomplete dropdown will break the editor state and cause unwanted cursor positioning and editing. This behavior is not observed when accepting the option using the enter key on the softkeyboard or when disabling "Predictive text".
Steps to reproduce:
fun
and chose thefunction definition
by tapping on the option in the dropdowneditor_break_after_autocomplete.mp4
Browser and platform
Android 15
Chrome 131.0.6778.200
Samsung Keyboard 5.8.20.7
Reproduction link
https://codemirror.net/try/
The text was updated successfully, but these errors were encountered: