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

Uncaught DOMException: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index. #20

Open
kof opened this issue Feb 24, 2022 · 0 comments

Comments

@kof
Copy link

kof commented Feb 24, 2022

Hi, just bumped into this, the solution is to check selection.rangeCount !== 0 before calling selectino.getRangeAt(0)

https://stackoverflow.com/questions/22935320/uncaught-indexsizeerror-failed-to-execute-getrangeat-on-selection-0-is-not

I got into this because I called getState() while disabled option is true

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