imaskjs
imaskjs copied to clipboard
Selection and mask-parts positions issue
Describe the bug Hi!
- Cursor moves to last position after try to change specific symbol (with mask 00/00/0000). In our team, I trying to solve this problem with force set selectionStart position, but it's not a best practice.
- Mask merges symbols position (for example, part of month's mask merges with year part).
To Reproduce I wrote example which plays my issue. https://codepen.io/egiv/pen/zYWaPVL?editors=1111
Expected behaviour
- I'm expect that position of cursor should be in expected position
- Every positions of parts of mask, locates in personal positions
Example:
17/08/2022|
17/08|
/2022
17/0|
/2022 (delete "8")
17/09|
/2022 (add "9")
Check this movie: https://user-images.githubusercontent.com/13790851/183438912-4edb330d-c037-4f0c-a649-b6701a4aafed.mov
- React 9.6.2
Additional context Please, help solve this problem.