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

Highlight characterRange ignores linebreaks and empty paragraphs, selectCharacters doesn't #455

Open
stillnotsure opened this issue Oct 13, 2018 · 1 comment

Comments

@stillnotsure
Copy link

If you have a body of text where the first element is a line break, followed by "abc", highlighting 'a' produces a characterRange of 0-1, showing that it has ignored the line break.

Then, Using rangy.getSelection().selectCharacters on that same character range, no text is selected, because it is trying to select the line-break at position 0.

I could just be using this wrong, but if not this inconsistent behaviour is very confusing.

@naoyeye
Copy link

naoyeye commented Nov 4, 2019

same problem when using highlighter module.

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