uNmAnNeR / imaskjs

vanilla javascript input mask
https://imask.js.org
MIT License
4.95k stars 257 forks source link

* pattern not working after a fixed caracter with a pattern mask #688

Closed julienNlT closed 2 years ago

julienNlT commented 2 years ago

Describe the bug The problem occurs when trying to type one of the fixed caracter after them. For exemple , for this patterm mask "BUG**", i am not able to type 'B', 'U', or 'G' for the first caracter.

To Reproduce https://codesandbox.io/s/musing-rhodes-nqpq0d?file=/src/InputMask.tsx:0-39

Expected behavior Expected to be able to type fixed caracter after them.

Environment:

Additional context I am using the mixin method with react-imask

Thanks for any help

uNmAnNeR commented 2 years ago

not a bug actually. what you do is: input -> raw value -> convert to unmasked value -> set unmasked value back to input as raw value. the last step is wrong. if you need unmasked value you have to use unmask={true}