vue: Vue not detecting autofill changes
This was previously discussed
Here’s my SPA login

The submit button is disabled, when the browser autofills my user/pass
Submit Markup
<input type="submit" value="LOG IN" v-on="click: login($event)" class="btn btn-block btn-info btn-lg"
v-attr="disabled: (!email||!password||processing)"
tabindex="3">
Initial State
data: function () {
return {
email: '',
password: '',
processing: false
}
},
Focusing the textboxes, causes the LOG IN button to be enabled
Google Chrome 45.0.2454.85 m
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 4
- Comments: 34 (7 by maintainers)
Commits related to this issue
- fix: use constant plugin NS close #1331 — committed to connor4312/vue by yyx990803 6 years ago
@krivoops I ran into a similar situation as you and ended up basing a solution off of this article https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
My mounted function ended up looking like this (dont copy paste this as this has code unique to my component 😊)
This is not a beautiful solution but it does what we need it to do for our app. Good luck!
Hi guys, is there any advice how to correctly solve this in 2017?
Based on the previous answers, this solved my issue:
I have the same problem too, any advice?
Meh, that polyfill only works with jQuery/Angular. I guess we need an even more generic polyfill.
Solution for WebKit browsers, this work for me.
Ya me too ! Anything new about this issue since ?
Can you try this: in your Vue instance’s
compiledhook, do the following: