Skip to content
Discussion options

You must be logged in to vote

@Ofer-Gal there is setSelectionRange() API and properties on input elements:

This method updates the HTMLInputElement.selectionStart, selectionEnd, and selectionDirection properties in one call.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
https://codesandbox.io/s/cool-darkness-cwe7oh?file=/src/App.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by layershifter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants