Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2186)

Unified Diff: chrome/browser/resources/help/help_page.js

Issue 1525953002: Fix flaky logo spin animation restart logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call getter instead of reading property Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/help/help_page.js
diff --git a/chrome/browser/resources/help/help_page.js b/chrome/browser/resources/help/help_page.js
index 7e075f2bafce6c85dc9b54f8e86b1e86b7e5568d..4269098fc154ce0fcf518eba84595ac3f231e0cf 100644
--- a/chrome/browser/resources/help/help_page.js
+++ b/chrome/browser/resources/help/help_page.js
@@ -165,7 +165,9 @@ cr.define('help', function() {
var logo = $('product-logo');
logo.onclick = function(e) {
logo.classList.remove('spin');
- setTimeout(function() { logo.classList.add('spin'); }, 0);
+ // Force a style recalc that cancels the animation specified by "spin".
+ getComputedStyle(logo).getPropertyValue('animation-name');
+ logo.classList.add('spin');
};
// Attempt to update.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698