-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot change the mask on multiple masks when the input is already filled. #2820
Comments
Which version are you using of the inputmask? Did you try with the latest beta? |
@RobinHerbots I used version 5.0.9, but I have also tried with version 5.0.10-beta.11, and the same problem occurred. I have found three ways to return to mask 1 in this situation (if I type something but do not complete mask 2, for example,
Thanks! |
Can you make a codepen for this case? I cannot reproduce it here. |
Or do you mean you have mask 2, you select all and want to start typing mask 1? |
@RobinHerbots I have created a CodePen here: https://codepen.io/WebCimes/pen/RwXWBgx. Thanks! |
Ah, that because when setting the value "5486 ____ ____ ___-" the spaces and dash are considered entered and so removing the numbers only isn"t sufficient. You want to save the masked value in the DB (or something alike)? Using something like this should fix it
|
@RobinHerbots Thanks for your help, it seems to work when the cursor is placed after However, if the cursor is directly positioned after You can see this behavior on the new CodePen: https://codepen.io/WebCimes/pen/bGXVJOp. It would be great to have an option similar to |
I am experiencing strange behavior. If I create two masks on one input like this:
When I type in the input field, I can select mask 1
aaa-9999-*
or mask2 9999 9999 9999 9999-9
. Inputmask works as expected.If I type something using mask 2 and complete the entire mask, for example,
5486 5555 6666 7777-2
, and then save my input, when I return to this edit page, I can delete the input with backspace and type something that matches mask 1.However, if I type something but do not complete mask 2, for example,
5486
, and then save my input, when I return to this edit page and try to switch to mask 1, I cannot. If I delete5486
with backspace, I can only type using mask 2 (I cannot switch to mask 1).Do you have any idea what the problem might be?
The text was updated successfully, but these errors were encountered: