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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/menu.js

Issue 10389016: Use hidden attribute rather the 'display: none' for hiding menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prevent FoUC with menus, using Evan's suggestion. Created 8 years, 7 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
Index: chrome/browser/resources/shared/js/cr/ui/menu.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/menu.js b/chrome/browser/resources/shared/js/cr/ui/menu.js
index 1928293c60406441e95f1c5a3f450ed4d1b438cd..97c663bd4e33f4302fcb7cce372614a3a5995e74 100644
--- a/chrome/browser/resources/shared/js/cr/ui/menu.js
+++ b/chrome/browser/resources/shared/js/cr/ui/menu.js
@@ -26,6 +26,9 @@ cr.define('cr.ui', function() {
this.addEventListener('mouseover', this.handleMouseOver_);
this.addEventListener('mouseout', this.handleMouseOut_);
+ this.classList.add('decorated');
+ this.hidden = true; // Hide the menu by default.
+
// Decorate the children as menu items.
var children = this.children;
for (var i = 0, child; child = children[i]; i++) {

Powered by Google App Engine
This is Rietveld 408576698