Describe the bug
If a input with type="number" has the v-mask directive, even if we not pass any mask, the input does not accept typing a .. The directive should not be enabled if an incompatible type is used, like the number.
Steps to reproduce
- Create a input with
type=number and v-mask="null"
- Type a number, then
.. Like: 16.. The . will not be rendered.
Suggestion
The documentation of maska tells the types that are compatible, but the directive only checks if the type is not a file type. The correct solution would be to only enable with the compatible types.
const allowedTypes = ['text', 'search', 'url', 'tel', 'password'];
const input = el instanceof HTMLInputElement ? el : el.querySelector('input');
if (input == null || !allowedTypes.includes(input.type)) return;
List of compatible types on the documentation: https://beholdr.github.io/maska/v3/#/issues?id=unsupported-input-types
Describe the bug
If a input with type="number" has the
v-maskdirective, even if we not pass any mask, the input does not accept typing a.. The directive should not be enabled if an incompatible type is used, like the number.Steps to reproduce
type=numberandv-mask="null".. Like:16.. The.will not be rendered.Suggestion
The documentation of maska tells the types that are compatible, but the directive only checks if the type is not a
filetype. The correct solution would be to only enable with the compatible types.List of compatible types on the documentation: https://beholdr.github.io/maska/v3/#/issues?id=unsupported-input-types