setSelection method logic
Open
- Dominant language
- JavaScript
- Stars
- 303
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.