From 7884fef5f3e47fcf7946401e087532ac88df459b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 22 Oct 2013 00:40:33 -0400 Subject: [PATCH] Fix animation reset in Firefox --- static/css/quay.css | 4 +++- static/js/controllers.js | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/static/css/quay.css b/static/css/quay.css index d3c505e3c..a1963bc80 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -587,7 +587,9 @@ p.editable:hover i { color: white; padding: 6px; border-radius: 4px; - +} + +.repo #clipboardCopied.animated { -webkit-animation: fadeOut 4s ease-in-out 0s 1 forwards; -moz-animation: fadeOut 4s ease-in-out 0s 1 forwards; -ms-animation: fadeOut 4s ease-in-out 0s 1 forwards; diff --git a/static/js/controllers.js b/static/js/controllers.js index 48d6a1159..f624c10b7 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -4,11 +4,13 @@ $.fn.clipboardCopy = function() { // Resets the animation. var elem = $('#clipboardCopied')[0]; elem.style.display = 'none'; - + elem.classList.remove('animated'); + // Show the notification. setTimeout(function() { elem.style.display = 'inline-block'; - }, 1); + elem.classList.add('animated'); + }, 10); }); };