Replies: 1 comment 6 replies
-
For the test, it is probably easier to just check if Might even be a part of the JS api on the That does seem like a bug for sure... |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
The other day I was working on some form logics and stumbled upon a, what I think is a bug.
The bug is that x-mask is initially triggering the :user-invalid css if the value is empty and the input has the required attribute.
It can be seen here:
https://codepen.io/tim-wils/pen/KKELypy
I dived into the repo and could bring it back to the x-mask directive setInput() function, where the el.value is always set and that's triggering the :user-invalid. I created a solution where the formattedValue is not the same as the current el.value and only then set the value.
That seems to work, so I created a failing test, but the failing test with the :user-invalid seems to always pass.
Workaround: ( the workaround is only in the fuction
let setInput = ()
https://codepen.io/tim-wils/pen/wvObPKg
This was the test I created:
Could someone help/confirm this is a bug and confirm the solution, so that we can create a PR to fix this?
Beta Was this translation helpful? Give feedback.
All reactions