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

Range input causes error trying to re-attach focus #184

Closed
JRJurman opened this issue Apr 30, 2022 · 2 comments · Fixed by #187
Closed

Range input causes error trying to re-attach focus #184

JRJurman opened this issue Apr 30, 2022 · 2 comments · Fixed by #187
Assignees

Comments

@JRJurman
Copy link
Member

Summary

When using an input with type range, trying to re-attach focus (and specifically set selectionStart / selectionEnd / selectionDirection) causes an error.

Potential Solution

We should wrap this logic in a try-catch. Usually I would suggest to do a more complex check here, but this happens when the element already has a setSelectionRange, so there isn't much else to check as far as I can tell.

@JRJurman JRJurman self-assigned this Apr 30, 2022
@JRJurman
Copy link
Member Author

I was half-way through writing this before getting distracted - I am working on this now and plan on having a PR out (hopefully) soon.

@JRJurman
Copy link
Member Author

This was found as a side effect of solving #185

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