remember the cursor position in TextField #26512
-
Is there a way to get the cursor position onchange of TextField and set it back when user comes back to it? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
layershifter
Jan 26, 2023
Replies: 1 comment
-
@Ofer-Gal there is
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
layershifter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Ofer-Gal there is
setSelectionRange()
API and properties oninput
elements:https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
https://codesandbox.io/s/cool-darkness-cwe7oh?file=/src/App.js