Open stevegal opened 8 years ago
hmm I tried your code, but it is still not working the password field is not filled (before user interaction)
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.
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.
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.