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

update on input events #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

update on input events #33

wants to merge 5 commits into from

Conversation

stevegal
Copy link

Chrome fires input events on autofill for things like username, so listen for these and resync.

Chrome doesn't allow password fields to be read in javascript before user interaction, so look for these and fire an autoFilled event on the element if this has happened.

@bettysteger
Copy link

hmm I tried your code, but it is still not working the password field is not filled (before user interaction)

@stevegal
Copy link
Author

Sorry i didn't make it clear, but if you want to pre-empt chrome filling in the value, your element must listen to the "autofilled" event I fire, then take appropriate action. Chrome will not allow us to read the value before user interaction, but we can get informed that it has autofilled. Not quite as seemless as tbosh, but now you can action.

@stevegal
Copy link
Author

To be a bit more precise, you have to "element.bind('autoFilled',callback)" where callback defines what you want to do when a browser autofilled and hasn't yet updated the model. Apologies again, if this was not clear.

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

Successfully merging this pull request may close these issues.

2 participants