Skip to content
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: CodeMirror + SwiftKey keyboard swipe typing crashes Google Chrome #1450

Closed
personalizedrefrigerator opened this issue Oct 1, 2024 · 6 comments

Comments

@personalizedrefrigerator

Describe the issue

Summary

Attempting to insert swiped text using the SwiftKey keyboard and the example CodeMirror control on codemirror.net/try causes the page to crash:

codemirror-crash.webm

Note that this also happens with the "minimal editor" example.

Prior versions

If I clone codemirror/dev and:

  1. git checkout 6.27.0 in codemirror/view
  2. git checkout 6.13.0 in codemirror/autocomplete (to fix build errors)
  3. run npm run dev
  4. Forward tcp:8090 to Android with adb reverse tcp:8090 tcp:8090.
  5. Swipe to enter text in the edit control.

then the crash does not occur. However, with codemirror/view v6.28.0, the crash does occur.

A git bisect suggests that the crash was introduced in 51d20b6bde168685f303e5993d79e396b4873f65.

Notes:

  • The crash still happens if I git checkout 6.28.5 from codemirror/view.

Browser and platform

Chrome Android 128.0.6613.148, Microsoft SwiftKey keyboard

Reproduction link

codemirror.net/try

@marijnh
Copy link
Member

marijnh commented Oct 2, 2024

Thanks for bisecting this down. As that commit suggests, this is related to CodeMirror's use of the new EditContext API. The issue appears to be a Chrome bug—I get the same crash in the EditContext example editor. I've filed Chrome issue 370804657. Will try to find some more time today to see if I can do any kind of mitigation on the CodeMirror side.

@marijnh
Copy link
Member

marijnh commented Oct 2, 2024

When this happens, the swipe input doesn't seem to produce any events that are delivered to the script at all. The screen just freezes for a moment, and the tab crashes. It seems hard to detect this virtual keyboard being used (which would allow us to selectively turn off EditContext). Because the main motivation for using EditContext in the first place is that it helps work around a host of wonky Android virtual keyboard issues, I really don't want to turn it off for all Chrome Android users.

I'm going to see if there's any response to the Chromium issue before doing anything drastic here.

@personalizedrefrigerator
Copy link
Author

I've reported this using the SwiftKey issue reporter (https://support-form.swiftkey.com/).

@marijnh
Copy link
Member

marijnh commented Oct 2, 2024

Thanks! Good idea.

@personalizedrefrigerator
Copy link
Author

The upstream bug has been marked as fixed.

@marijnh
Copy link
Member

marijnh commented Oct 17, 2024

Nice! The only thing we can do then is wait for new Chrome releases that include the fix. I'm going to close this issue here.

@marijnh marijnh closed this as completed Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants