Mahn
Mahn

Reputation: 16605

Is there a way to become aware of an input being autofilled as a result of the built in "remember password" browser functionality?

Browsers like Firefox or Chrome offer to remember the password when you login for the first time on a page; this functionality autofills the corresponding user/password combination in the login form the next time the user visits said page.

My question is, is there any way to become aware that the browser has autofilled these fields? the event change does not fire; in fact, according to monitorEvents nothing fires. I've resorted to use an interval that periodically checks whether the fields are empty or not, but is there a better way?

Upvotes: 4

Views: 103

Answers (1)

Pevara
Pevara

Reputation: 14308

I am quite sure Chrome does fire the change event. I have experienced it recently (by accident). It is also already documented in Chromium Issue 135307.

Not sure about other browsers, but if you are write a periodic check will probably be the only solution. This code seems solid.

Upvotes: 2

Related Questions