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

Very buggy/glitchy lifting of nested list item using Backspace on Android #1448

Open
thecodrr opened this issue Feb 20, 2024 · 1 comment
Open

Comments

@thecodrr
Copy link

Here's a video demo:

Recording_2024-02-20-18-10-23-ezgif.com-resize-video.mp4

This issue is reproducible on Firefox using OpenBoard, SwiftKey & GBoard.

On Google Chrome, the issue is completely different:

Recording_2024-02-20-18-18-03-ezgif.com-resize-video.mp4

Tested on the default editor on https://prosemirror.net

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Mar 5, 2024
FIX: Improve Android backspace detection when the native effect is to delete
an entire block element.

Issue ProseMirror/prosemirror#1448
@marijnh
Copy link
Member

marijnh commented Mar 5, 2024

Firefox Android's default backspace behavior in list items seems extremely buggy. And because it doesn't, for some reason, fire an actual keydown event that's identifiable as backspace when you hit the virtual keyboard's backspace, ProseMirror isn't able to reconstruct that backspacing is happening, so it can't do much except integrate the weird DOM changes it sees the browser make into its document.

It is easy to reproduce many of these without ProseMirror. For example, in this document, if you put the cursor in the empty paragraph and press backspace, you for some reason get a new empty list item before the "Two" item, even though the cursor was after it.

<div contenteditable="true"><ul><li><p>One</p><ul><li><p>Two</p></li></ul><p><br></p></li></ul></div>

Given that this is clearly a browser issue, and that Firefox's market share on Android is tiny, I'm not super motivated to try and add kludges to detect and work around this.

Attached patch solves at least one list-related issue on Chrome. But I wasn't able to see the behavior you show in your video. Some of the backspace behavior shown there is exactly what I would expect. Instead of a video, a precise textual description of what document you start with and which steps you need to take to get the behavior you didn't expect would be easier to work with.

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