RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

Numeric value is not unmasked on delete #1575

Open an-kh opened 7 years ago

an-kh commented 7 years ago

Hello!

I've tried to update to version of the inputmask 3.3.5 from 3.3.4. I found that in 3.3.5 it's not possible to delete the value, if placeholder is set, and. Also, value is not unmasked, when you are trying to delete it. You can test on this example: https://jsfiddle.net/5o4k0b3t/

RobinHerbots commented 7 years ago

@an-kh ,

What exactly is not working? I tried you fiddle but don't see the problem.

an-kh commented 7 years ago

So the steps are as follows:

  1. Input some numeric value into the field.
  2. Delete value by backspace or by selecting all and deleting. By my expectations, the unmasked value on deletion should be empty value, instead of "0". It worked like that in 3.3.4 version. Here is 3.3.4 version fiddle to check: https://jsfiddle.net/5o4k0b3t/1/
IvanZepeta commented 7 years ago

I had a similar problem solved it with the function oncleared, implement it in your example and it works, here I leave the link : https://jsfiddle.net/5o4k0b3t/10/