You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deleting first number where the number is in the hundreds causes the whole number to be deleted apart from 0. This is not the case for example where the number is in the thousands
🔬 Minimal Reproduction
Using your own example https://jsdaddy.github.io/ngx-mask/#1 where the mask is set to 'separator.2' for example, enter the number 500 then delete the first number 5. You will see that the whole number is deleted leaving just 0.
If you try the same for 5000 then only the number 5 is deleted as expected
Also if you try 555 and delete the first 5 then this also works as expected
Anything else relevant?
I've tried in both Chrome and Edge on a Mac
The text was updated successfully, but these errors were encountered:
It looks like the check to see if a decimal separator needs to be added needs an additional check to see if it's a zero, otherwise it adds a second decimal - this then causes issues when the later formatters run. The same issue occurs for any number where the next digit is a zero (505,000 for example becomes 0.50 when you delete the first 5).
🐞 bug report
Is this a regression?
Not sure
Description
Deleting first number where the number is in the hundreds causes the whole number to be deleted apart from 0. This is not the case for example where the number is in the thousands
🔬 Minimal Reproduction
Using your own example https://jsdaddy.github.io/ngx-mask/#1 where the mask is set to 'separator.2' for example, enter the number 500 then delete the first number 5. You will see that the whole number is deleted leaving just 0.
If you try the same for 5000 then only the number 5 is deleted as expected
Also if you try 555 and delete the first 5 then this also works as expected
Anything else relevant?
I've tried in both Chrome and Edge on a Mac
The text was updated successfully, but these errors were encountered: