ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.59k stars 335 forks source link

Undo after deleting content on Android can sporadically trick ProseMirror into thinking selection is collapsed when it's not #1393

Open Nantris opened 1 year ago

Nantris commented 1 year ago

In the image below you can see that the selection is believed to be collapsed on the ProseMirror side, but the UI and the window-selection both properly reflect the expanded selection. Please ignore the text in the images, it's irrelevant.

To reproduce this, delete some content in an expanded selection on Android in Chrome, then undo. Repeat these steps until the issue occurs. Sometimes you may need to re-select the content and try again for this to trigger.

Unknowns:

Android version: 13 Android keyboard: GBoard Browser: Chrome

image image

Nantris commented 1 year ago

This may be because after undo Android seems to set the selection's startContainer to the parent p node, rather than inside of it in the #text node.

image

Nantris commented 1 year ago

Friendly bump.