Fix accept animation in chrome
This commit is contained in:
parent
212b8fe062
commit
acb24d9713
1 changed files with 9 additions and 4 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
@focusin="focusIn"
|
@focusin="focusIn"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
@keydown="keyDown"
|
@keydown="keyDown"
|
||||||
|
@animationend="animationEnd"
|
||||||
/>
|
/>
|
||||||
<sync-property-button @click="requestUpdate" />
|
<sync-property-button @click="requestUpdate" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -42,6 +43,7 @@
|
||||||
@focusin="focusIn"
|
@focusin="focusIn"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
@keydown="keyDown"
|
@keydown="keyDown"
|
||||||
|
@animationend="animationEnd"
|
||||||
/>
|
/>
|
||||||
<sync-property-button @click="requestUpdate" />
|
<sync-property-button @click="requestUpdate" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -60,6 +62,7 @@
|
||||||
@focusin="focusIn"
|
@focusin="focusIn"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
@keydown="keyDown"
|
@keydown="keyDown"
|
||||||
|
@animationend="animationEnd"
|
||||||
/>
|
/>
|
||||||
<sync-property-button @click="requestUpdate" />
|
<sync-property-button @click="requestUpdate" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -139,10 +142,6 @@ export default {
|
||||||
animate(updated) {
|
animate(updated) {
|
||||||
if (updated) {
|
if (updated) {
|
||||||
this.animateUpdate = true;
|
this.animateUpdate = true;
|
||||||
setTimeout(() => {
|
|
||||||
this.animateUpdate = false;
|
|
||||||
this.$emit('animationShown');
|
|
||||||
}, 700);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -239,6 +238,10 @@ export default {
|
||||||
updateIsEdited: function() {
|
updateIsEdited: function() {
|
||||||
this.isEdited = this.deepStringify(this.internalValue) !== this.deepStringify(this.value);
|
this.isEdited = this.deepStringify(this.internalValue) !== this.deepStringify(this.value);
|
||||||
},
|
},
|
||||||
|
animationEnd: function() {
|
||||||
|
this.animateUpdate = false;
|
||||||
|
this.$emit('animationShown');
|
||||||
|
},
|
||||||
deepStringify: function(val) {
|
deepStringify: function(val) {
|
||||||
if (Array.isArray(val)) {
|
if (Array.isArray(val)) {
|
||||||
return JSON.stringify(val.map(String));
|
return JSON.stringify(val.map(String));
|
||||||
|
|
@ -280,5 +283,7 @@ export default {
|
||||||
}
|
}
|
||||||
.flash {
|
.flash {
|
||||||
animation: green-flash 0.7s ease;
|
animation: green-flash 0.7s ease;
|
||||||
|
/*Without this background-colour chrome will ignore the animation colour.*/
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue