Hello,
I have a generic component that add validators, embed errors notifications, set mask, and do other stuffs about just an input component.
Specifically, my component get the input type and mask through the @Input variables.
In the case I provide an input type="number", and do not specify a mask (which is then null/undefined), I get the following javascript error:
DOMException: Failed to set the 'selectionStart' property on 'HTMLInputElement': The input element's type ('number') does not support selection.
at MaskDirective.push../node_modules/ngx-mask/fesm5/ngx-mask.js.MaskDirective.onFocus (http://localhost:4200/modules-screens-screens-module.js:2480:31)
Is it possible to totally deactivate the mask when its content is null or undefined?
Thanks!
@asterius321 Hello, frist of all mask work only with input type text
Ok, I understand It does not provide many benefits on number input types (though...).
But it still seems strange to me that the directive effectively do something when no mask is provided...
Could be great if no error could be generated in this case.
Most helpful comment
Ok, I understand It does not provide many benefits on number input types (though...).
But it still seems strange to me that the directive effectively do something when no mask is provided...
Could be great if no error could be generated in this case.