Index: chrome/browser/resources/print_preview_animations.js |
diff --git a/chrome/browser/resources/print_preview_animations.js b/chrome/browser/resources/print_preview_animations.js |
index 800c83edf97d3054055ee1a9460e6665ec334a8b..634fe7ac0965826ffde69b1238b6505b6f0504f5 100644 |
--- a/chrome/browser/resources/print_preview_animations.js |
+++ b/chrome/browser/resources/print_preview_animations.js |
@@ -18,7 +18,7 @@ function addAnimation(code) { |
return name; |
} |
-function showInvalidHint(el) { |
+function fadeInElement(el) { |
if (el.classList.contains('visible')) |
return; |
el.classList.remove('closing'); |
@@ -31,9 +31,13 @@ function showInvalidHint(el) { |
'100% { opacity: 1; height: ' + height + 'px; }'); |
el.style.webkitAnimationName = animName; |
el.classList.add('visible'); |
+ el.addEventListener('webkitAnimationEnd', function() { |
+ el.style.height = ''; |
+ el.style.webkitAnimationName = ''; |
+ }, false ); |
} |
-function hideInvalidHint(el) { |
+function fadeOutElement(el) { |
if (!el.classList.contains('visible')) |
return; |
el.style.webkitAnimationName = ''; |