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

Unified Diff: chrome/browser/resources/options/options_page.js

Issue 173123002: webkitTransitionEnd is not triggered if property chane happens too fast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 6 years, 10 months 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/options/options_page.js
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index befb7c813981bc869dfda9aa7f179a426fd178f3..303d16781074416a7f47c98f7ffc94e20870324d 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -887,11 +887,16 @@ cr.define('options', function() {
// TODO(flackr): Use an event delegate to avoid having to subscribe and
// unsubscribe for webkitTransitionEnd events.
container.addEventListener('webkitTransitionEnd', function f(e) {
- if (e.target != e.currentTarget || e.propertyName != 'opacity')
+ var propName = e.propertyName;
+ if (e.target != e.currentTarget ||
+ (propName && propName != 'opacity')) {
return;
+ }
container.removeEventListener('webkitTransitionEnd', f);
self.fadeCompleted_();
});
+ // -webkit-transition is 200ms. Let's wait for 400ms.
+ ensureTransitionEndEvent(container, 400);
}
if (visible) {
« 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