Skip to content

update on input events#33

Open
stevegal wants to merge 5 commits into
tbosch:masterfrom
stevegal:master
Open

update on input events#33
stevegal wants to merge 5 commits into
tbosch:masterfrom
stevegal:master

Conversation

@stevegal

Copy link
Copy Markdown

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
Copy Markdown

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

@stevegal

Copy link
Copy Markdown
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
Copy Markdown
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