Fix autocomplete not triggering on mobile (CM5 input handling)#4017
Open
aashu2006 wants to merge 1 commit intoprocessing:developfrom
Open
Fix autocomplete not triggering on mobile (CM5 input handling)#4017aashu2006 wants to merge 1 commit intoprocessing:developfrom
aashu2006 wants to merge 1 commit intoprocessing:developfrom
Conversation
Contributor
Author
|
@raclim would appreciate your thoughts here as well, especially since this relates to the earlier discussion around mobile autocomplete behavior, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Fixes #4007
This PR builds on the issue identified and discussed by @skyash-dev and me at Discord. We focused on investigating the mobile input behavior in CodeMirror and then I implementing a fix for the autocomplete trigger.
Autocomplete suggestions were not triggering reliably on mobile devices due to differences in CodeMirror’s input handling (IME + contenteditable path in CM5)
Demo:
Tested on a real Android device (Chrome). Autocomplete now appears while typing with the virtual keyboard.

Changes:
change(desktop input)compositionend(word commit on mobile)compositionupdate(IME typing support)triggerHinthelper to unify logic"bac "to ensure correct token detectionNotes:
I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123