-
Notifications
You must be signed in to change notification settings - Fork 52
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
setSelection method logic #35
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys.
Could you explain me the logic of the setSelection methods for my case?
E.g. I have a pattern
(111) 111-1111
. I want to edit number starting from the fourth digit.So, I call
setSelection({start: 6, end: 6})
, but... Oh! That sets selection to{start: 4, end: 4}
! Ok, I think, it's okay if it works correctly. But.. when I try to paste some digits it just skips first of them and only after this skipping selection becomes{start: 6, end: 6}
. Of course, other numbers paste normally after that.So, tell me pls what's the logic of this work and if there are mistakes how should it work?
The text was updated successfully, but these errors were encountered: