User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
The autofill feature is dispatching the change event on input of type password, but not on input of type text or email.
- create a simple webpage with a login form containing an input of type email and an input of type password
- attach change handlers to the input fileds
- attach a submit handler (which prevents the default submit behavior) to the form element
- fill the form and submit so that firefox will ask you to save the entered credentials
- reload the page so that firefox will autofill with the saved credentials
- verify that the change event only gets dispatched by the input of type password and not by the email/text input
The change event does not fire on input of type email or text, but fires on input of type password when Firefox autofills a login form on page load.
This is due to the fact that, for security reasons, autofilled passwords are notified with the change event only after the user has interacted with the page, while plain-text fields are autofilled before any event handler is attached.