Swiping to change selection with GBoard collapses keyboard

I noticed today that if you swipe to increase the selection position at the end of a document that the keyboard collapses. It would be great if this could be avoided, though I’m not certain it’s a reasonable request.

Example of the swiping: https://youtu.be/V_4yMGKbe90?si=Lij0Dnc1mlajPe9s&t=55

This is reproducible in any ProseMirror demo.

Actual behavior: The editor remains the document.activeElement when this occurs, but the selection moves to another element on the page.

Expected behavior: Selection remains locked to the end of the editor if the user tries to swipe past its ending

Real world implications: It’s not just an edge case for the sake of edge cases. When the user swipes to select like this, there’s a fair amount of impreciseness and it’s easy to accidentally cause the keyboard to close itself.

This is something that also happens in a plain contenteditable element (if there is text after it in the page). As such, I’d say it’s an issue in GBoard (or Chrome), and I don’t think ProseMirror can really do much about it.

1 Like