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

selecting empty list item causes error #130

Closed
bantic opened this issue Sep 15, 2015 · 0 comments · Fixed by #131
Closed

selecting empty list item causes error #130

bantic opened this issue Sep 15, 2015 · 0 comments · Fixed by #131
Assignees

Comments

@bantic
Copy link
Collaborator

bantic commented Sep 15, 2015

To reproduce:

  • create three list items, where the 1st and 3rd have text and the 2nd is blank
  • put cursor in the 2nd item, use shift+ to select the list item below
  • console reports "Could not find parent section from element node"

This happens because the browser will report (via window.getSelection()) that the focus node is the 3rd <li> itself, rather than the inner textNode, which is what Cursor#fromNode was expecting.

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

Successfully merging a pull request may close this issue.

1 participant