imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

Leading zero blocks the input

Open bam opened this issue 3 years ago • 2 comments

Describe the bug Leading zero stops the input

To Reproduce

  1. Open demo for Number mask
  2. Type 0
  3. Type any non zero other number

Expected behavior Value becomes the number from step 3.

Environment:

  • OS: macOS
  • Browser Chrome
  • Version 91
  • IMask version 6.1.0
  • Framework/plugin React 16

bam avatar Jul 19 '21 18:07 bam

Another one case with leading zeroes:

  1. Type 2
  2. Put cursor to the left
  3. Type 0 (yes, it's able!)
  4. Repeat 2 then 3

Result: image

But input after 2 or inbetween is blocked

bam avatar Jul 19 '21 18:07 bam

Seeing the same behavior.

AaronBeaudoin avatar Mar 25 '22 19:03 AaronBeaudoin

first case is not fixed (imo on input value should be either allowed or blocked but not replaced)

uNmAnNeR avatar Sep 20 '22 07:09 uNmAnNeR