diff --git a/webapp/src/components/labThingsComponents/inputFromSchema.vue b/webapp/src/components/labThingsComponents/inputFromSchema.vue
index c9f95188..2d90c41c 100644
--- a/webapp/src/components/labThingsComponents/inputFromSchema.vue
+++ b/webapp/src/components/labThingsComponents/inputFromSchema.vue
@@ -11,6 +11,7 @@
@focusin="focusIn"
@focusout="focusOut"
@keydown="keyDown"
+ @animationend="animationEnd"
/>
@@ -42,6 +43,7 @@
@focusin="focusIn"
@focusout="focusOut"
@keydown="keyDown"
+ @animationend="animationEnd"
/>
@@ -60,6 +62,7 @@
@focusin="focusIn"
@focusout="focusOut"
@keydown="keyDown"
+ @animationend="animationEnd"
/>
@@ -139,10 +142,6 @@ export default {
animate(updated) {
if (updated) {
this.animateUpdate = true;
- setTimeout(() => {
- this.animateUpdate = false;
- this.$emit('animationShown');
- }, 700);
}
}
},
@@ -239,6 +238,10 @@ export default {
updateIsEdited: function() {
this.isEdited = this.deepStringify(this.internalValue) !== this.deepStringify(this.value);
},
+ animationEnd: function() {
+ this.animateUpdate = false;
+ this.$emit('animationShown');
+ },
deepStringify: function(val) {
if (Array.isArray(val)) {
return JSON.stringify(val.map(String));
@@ -280,5 +283,7 @@ export default {
}
.flash {
animation: green-flash 0.7s ease;
+ /*Without this background-colour chrome will ignore the animation colour.*/
+ background-color: white;
}