-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Milestone
Description
- Describe the bug
I am trying to create an input for IBANs where the mask changes by country (determined by the country code, first two chars).
This seems to work with altenator masks, but there is strange behaviour when deleting inside the entered value. Chaning the country code in an complete IBAN triggers multiple issues:
Double deleting and wrong formatting
- Enter AT703219514513719557.
- Move caret after AT.
- First backspace does nothing.
- Second backspace deletes both characters.
- Formatting of input is wrong (last 8 characters are one group instead of two).
Wrong mask
- After deleting AT enter DE.
- Delete DE and enter AT again.
- Last two placeholder remain, although the AT mask would be shorter.
Unable to delete country code
- enter DE16500105177187882946.
- country code cannot be deleted.
- The formatting changes (last two 4-groups are merged to an 8-group).
- Add a link to a codepen, jsfiddle or other example page which shows the problem
https://stackblitz.com/edit/typescript-4yu45b - OS: Windows 10
- Browser: Firefox 104, Chrome 105
- Inputmask version: 5.07 and 5.0.8-beta.25