fix: Manually trigger a change-event when autofill is used in webkit-browsers #12133

This commit is contained in:
Johannes Schill
2019-01-16 15:09:48 +01:00
parent cc8b450799
commit a558e76a68
5 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
// <3: https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
// sass-lint:disable no-empty-rulesets
@keyframes onAutoFillStart { from {/**/} to {/**/}}
@keyframes onAutoFillCancel { from {/**/} to {/**/}}
input:-webkit-autofill {
animation-name: onAutoFillStart;
transition: transform 1ms;
}
input:not(:-webkit-autofill) {
animation-name: onAutoFillCancel;
}