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

Gboard doesn't delete text in Firefox #1380

Open
Iron16Bit opened this issue May 7, 2024 · 7 comments
Open

Gboard doesn't delete text in Firefox #1380

Iron16Bit opened this issue May 7, 2024 · 7 comments

Comments

@Iron16Bit
Copy link

Describe the issue

I was able to reproduce the bug both on Android 14 and in Android 6.
When trying to delete text in a CodeMirror 6 editor using Gboard in Firefox, text isn't deleted. This doesn't happen neither using another keyboard (CodeBoard) nor in Chrome.

The error can be repoduced by copying the content of this repo on an Android device and hosting it through a simple http server.
The content of the repo are a set of slides made for ICP

Trying to delete using Gboard in Firefox:

Record_2024-05-07-16-46-02.mp4

Trying to delete using CodeBoard in Firefox:

Record_2024-05-07-16-46-43.mp4

Trying to delete using Gboard in chrome:

Record_2024-05-07-16-47-16.mp4

Browser and platform

Android Firefox

Reproduction link

No response

@marijnh
Copy link
Member

marijnh commented May 8, 2024

That repository doesn't show me how you're using the editor. Try to set up something much simpler on https://codemirror.net/try and I can take a look. Trying this in a simple minimal demo doesn't reproduce the issue you describe.

@Iron16Bit
Copy link
Author

Unfortunately I wasn't able to reproduce it using the suggested playground. Might this be related to hosting from local storage?

By locally hosting a much simpler project and trying to delete the text, only in Firefox and using Gboard it happened that it also deleted text on the right of the text cursor.

As for the project from the videos, this is the whole repo, but in particular this is the general container of the editor

@marijnh
Copy link
Member

marijnh commented May 8, 2024

Using halfway current versions of the CodeMirror packages might help.

@Iron16Bit
Copy link
Author

Sorry, it was just a repo I quickly found online. Yet, plese refer to the last sentence talking about the repo with the project from the videos. That still is CodeMirror 6.0.1

@marijnh
Copy link
Member

marijnh commented May 8, 2024

The package lock seems to use @codemirror/view 6.6, which is from 2022

@Iron16Bit
Copy link
Author

Updating it did not work. On the other hand, I noticed the problem might be on my end.
Some of the editors are managed using Workers while others using SharedWorkers, seems like the problem only happens with the first category

@Iron16Bit
Copy link
Author

A quick update: I tried to recreate a minimal environment using CodeMirror and a WebWorker but there were no problems.
I then tried to use Svelte and CodeMirror, but still no problems. I'm at a loss, I'm not sure what is causing the problem in the original repo

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