ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

The decimal marker is automatically removed by deleting the leading amount

Open elbracht opened this issue 7 months ago • 0 comments

🐞 bug report

Is this a regression?

No, this behavior did not work in the previous version

Description

The problem exists with input fields for a currency amount. If all numbers before the decimal marker are deleted, the decimal marker is automatically removed and the former decimal amount is now the total amount.

🔬 Minimal Reproduction

It can be recreated on your documentation page (https://jsdaddy.github.io/ngx-mask/#2). I have used the "Separator leadZero" example.

  1. Input: 12.34
  2. Delete the numbers 1 and 2 before the decimal marker
  3. Actual: "34" remains in the field
  4. Target: ",34" should remain in the field and become 0,34 when leaving the field.

🌍 Your Environment

Angular Version:

Angular: 19.1.3 ngx-mask: 19.0.6

elbracht avatar Mar 07 '25 15:03 elbracht