RobinHerbots / Inputmask

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

autounmask and knockout binding #940

Open maubin opened 9 years ago

maubin commented 9 years ago

I have a view that has text input binded to a viewmodel with knockout. I noticed that when the viewmodel is updated by the knockout binding, the "autounmask" option is ignored. The value in the viewmodel will always contain the masked value.

Is this an issue and/or is there a workaround?

I made a jsfiddle that reproduce my issue. : http://jsfiddle.net/ak1r1bp1/1/

Thank you!

RobinHerbots commented 9 years ago

The jsfiddle shows the unmaskedvalue? On which browser(s) are you testing?

maubin commented 9 years ago

Sorry I forgot to add some instruction for the fiddle. When the page load the value is fine, it's unmasked. But when you go in the input and type a value (and the binding is updated) the new value in the viewmodel is masked.

maubin commented 9 years ago

Removed: I realized I made a typo.

maubin commented 9 years ago

I realize I also made the same typo in my first fiddle. autounmask was missing a capital letter. I still have the issue in my project but cannot reproduce it in a jsfiddle yet. I'll try and make some more tests.