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

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

Open
Nantris opened this issue Jul 1, 2023 · 2 comments

Comments

@Nantris
Copy link

Nantris commented Jul 1, 2023

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:

  • It may need to be nested list content but I don't believe that to be the case right now.
  • It may be necessary for the $anchor to be before the $head

Android version: 13
Android keyboard: GBoard
Browser: Chrome

image
image

@Nantris
Copy link
Author

Nantris commented Jul 1, 2023

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
Copy link
Author

Nantris commented Aug 8, 2023

Friendly bump.

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

1 participant