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

setSelection method logic #35

Open
DmitryKa opened this issue Mar 6, 2017 · 0 comments
Open

setSelection method logic #35

DmitryKa opened this issue Mar 6, 2017 · 0 comments

Comments

@DmitryKa
Copy link

DmitryKa commented Mar 6, 2017

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?

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

No branches or pull requests

1 participant