ngx-mask
ngx-mask copied to clipboard
'Backspace' seems fine but 'delete' leaves the cursor one character to the right too far.
🐞 bug report
Description
Pressing delete in the middle of an input field using a mask leaves the cursor one character too far to the right.
🔬 Minimal Reproduction
in the examples page at https://jsdaddy.github.io/ngx-mask-page/main do the following to assert this behavior:
In the date-time test entry, first input 12/12/12 12:12:12 then, try to change the time to 12:32:12 by placing cursor before the '1' for the minutes. pressing "delete" does indeed removes the '1' but places the cursor AFTER the following '2' instead of just before.
Note: This does NOT happen when the character being deleted is located just before a special separator character. for example, replacing the time from 12:12:12 to 12:13:12 by placing the cursor before the "2" of minutes and pressing delete, does leave the cursor at the right place in between "11".