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

Backspace on Android phones adds characters instead of deleting the @mention #1

Open
randolf opened this issue Mar 24, 2019 · 4 comments

Comments

@randolf
Copy link

randolf commented Mar 24, 2019

Hello. Using the example at https://star-drug.glitch.me/ on Android phones (with Google Chrome or Opera) results in adding characters instead of deleting the @mention code. (Backspace does work as expected on a desktop PC running Linux or Windows.)

For example, if I add @johndoe as a mention, using the Backspace key to delete it results in adding more characters like "Do" or "oe" or "DDo" ... and each attempt to use the Backspace key keeps adding more of these.

@randolf
Copy link
Author

randolf commented Mar 24, 2019

Anyone who is looking into this matter will probably find this to be of relevant interest: ProseMirror/prosemirror#837

@joelewis
Copy link
Owner

Thanks for reporting this @randolf

I can reproduce this issue on Android Chrome. I suspect it to be a problem with the mainstream project. Will figure out what's going wrong and update here.

@veesahni
Copy link

veesahni commented Oct 4, 2021

FYI - I can still reproduce this with Android / Chrome.

ProseMirror/prosemirror#837 is closed and the steps referenced in that issue don't cause a problem. So looks like that was unrelated.

@veesahni
Copy link

@joelewis - I've gathered more information for this one.

Perceived Bug: Cannot delete mentions in Android / Chrome

Why is this happening?: There's an underlying bug in Chrome that's been open since 2016 without much movement. In short: trying to remove a non-contenteditable sitting inside a contenteditable doesn't work properly.

Possible Workarounds:

  • Add an invisible character around (or just after) the mention... and then delete the mention when the invisible character is removed. Messy
  • tiptap, which is built on prosemirror has a similar issue. This comment pointed to this sample which is working properly on android / chrome. Here, the code is removing the mention if the character directly after the mention is removed.. less messy when it's typical to have a space right after the mention

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

3 participants