Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error occurs when input is filled using Chrome autofill #2818

Open
jimmyko opened this issue Sep 13, 2024 · 2 comments
Open

Type error occurs when input is filled using Chrome autofill #2818

jimmyko opened this issue Sep 13, 2024 · 2 comments

Comments

@jimmyko
Copy link

jimmyko commented Sep 13, 2024

Descriptioin

Below error showing in console when user fill input with using Chrome autofill feature
image

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
@jimmyko
Copy link
Author

jimmyko commented Sep 13, 2024

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.

@RobinHerbots
Copy link
Owner

Hi @jimmyko ,

Have a try with 5.0.10-beta.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants