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

Can detect change in only one input #4

Open
mihir0x69 opened this issue Nov 29, 2016 · 2 comments
Open

Can detect change in only one input #4

mihir0x69 opened this issue Nov 29, 2016 · 2 comments

Comments

@mihir0x69
Copy link

I'm using chrome. When chrome autofills my login form, it fires the event on username's input. But it doesn't fire for change in password. It's only when you click somewhere on the screen that the password's event fires.

What I want is it should fire events for both of the inputs, so that I can make appropriate style changes.

@ecozoic
Copy link

ecozoic commented Jan 27, 2017

Same issue (I'm using the tbosch version). Can repro here on the test page: http://tbosch.github.io/autofill-event/test/manual/login-form.html. Not sure if its number of inputs or if its related to the fact that its a password field...

EDIT -
Further research shows that Chrome security policy does not allow detection of password autofills until user interacts with the page in some way. For my case, I ended up just detecting the autofill of the username field and using that to trigger whatever I need for the password field as well. Not perfect but it works.

@mihir0x69
Copy link
Author

I set up custom listeners using setTimeout. It's not a clean solution, but it works.

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