You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.
I have 2 fields in my project requiring mask to have some prefix.
Prefix is supposed to be shown inside the field (just as mask is)
Another story is that I have my own directive to apply this prefix
to both mask and model value for my own convenience, but this
bug is not related to that code since I was able to reproduce it
on Codepen (linked below)
Current latest release of uiMask (1.8.7) has a bug that causes
characters from prefix occurring after a space characterto be
copied into masked part of the input in case prefix has space
character in it if one of prefix characters happens to be a meaningful
character for the mask.
e.g. if prefix is 1234 89 and then mask is 99 9999 9999
(I'm interested in gathering last 10 out of 16 digits of Payback card)
when field is focused value becomes
1234 8989 ____ ____ instead of expected
1234 89__ ____ ____
Additional 89 is removed on blur unless clearOnBlur is set to false
(which is my case). If it's set to true on each focus another 89 is
added to model.
What's interesting: Replacing space with a non-breaking space
in the prefix only is a workaround.
I have 2 fields in my project requiring mask to have some prefix.
Prefix is supposed to be shown inside the field (just as mask is)
Another story is that I have my own directive to apply this prefix
to both mask and model value for my own convenience, but this
bug is not related to that code since I was able to reproduce it
on Codepen (linked below)
Current latest release of uiMask (1.8.7) has a bug that causes
characters from prefix occurring after a space characterto be
copied into masked part of the input in case prefix has space
character in it if one of prefix characters happens to be a meaningful
character for the mask.
e.g. if prefix is 1234 89 and then mask is 99 9999 9999
(I'm interested in gathering last 10 out of 16 digits of Payback card)
when field is focused value becomes
1234 8989 ____ ____ instead of expected
1234 89__ ____ ____
Additional 89 is removed on blur unless
clearOnBlur
is set to false(which is my case). If it's set to true on each focus another
89
isadded to model.
What's interesting: Replacing space with a non-breaking space
in the prefix only is a workaround.
Example presenting all above: https://codepen.io/jrencz/pen/GvmxyL
The text was updated successfully, but these errors were encountered: