Wrong cursor position when deleting/adding symbols not from the end of input
kitmurkit2 opened this issue · comments
Volodymyr Kit commented
Describe the bug
I noticed this bug in your demo for Money format: full via hooks. The cursor changes its position after a new comma sign is added/removed inside of the input.
Steps to reproduce
- In your demo page open Money format: full via hooks
- Type 1234567 // $1,234,567|
- Then move the cursor after 3 // $1,23|4,567
- Press backspace one time // $124|,567
- The cursor changed its position and now will be after 4
- Now after pressing backspace one more time 4 will be deleted // $12|,567
Actual result:
- 3 and 4 were deleted
Expected result:
- 2 and 3 should be deleted
- The cursor must not change its position
Screenshots
Asjad Ali commented
Also, it does not opt-in the direction you specified by default
Alexander Shabunevich commented
Thanks for report. Should be fixed in new v3.