Fix animation reset in Firefox

This commit is contained in:
Joseph Schorr 2013-10-22 00:40:33 -04:00
parent 0c979cd79f
commit 7884fef5f3
2 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -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);
});
};