Inputmask
Inputmask copied to clipboard
Type error occurs when input is filled using Chrome autofill
Descriptioin
Below error showing in console when user fill input with using Chrome autofill feature
How to replicate
https://jsfiddle.net/Lotvb9kq/
- Open the link in Chrome
- fill the input, e.g. 999
- press the submit button, it will show 404
- re-run the fiddle
- you should see autofill suggestion when you click the input
- choose autofill suggestion
- you should see the error in console if you open the devtool
Environment
- OS: macOS 14.6.1 (23G93)
- Browser: Chrome 128.0.6613.120
- Inputmask: 5.0.9
Chrome autofill triggers keyup and keydown event without KeyboardEvent object, so there is no key property. The code assume KeyboardEvent object is always been used.
Hi @jimmyko ,
Have a try with 5.0.10-beta.11