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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/context_menu_handler.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
« no previous file with comments | « chrome/browser/resources/shared/css/menu.css ('k') | chrome/browser/resources/shared/js/cr/ui/menu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
index b478acee474178a7547175375d1ed07680fba3a3..696bb73431ccc1f223f3188189314c607655fe2a 100644
--- a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
+++ b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
@@ -31,8 +31,8 @@ cr.define('cr.ui', function() {
*/
showMenu: function(e, menu) {
this.menu_ = menu;
+ menu.hidden = false;
- menu.style.display = 'block';
// when the menu is shown we steal all keyboard events.
var doc = menu.ownerDocument;
doc.addEventListener('keydown', this, true);
@@ -52,7 +52,7 @@ cr.define('cr.ui', function() {
if (!menu)
return;
- menu.style.display = 'none';
+ menu.hidden = true;
var doc = menu.ownerDocument;
doc.removeEventListener('keydown', this, true);
doc.removeEventListener('mousedown', this, true);
« no previous file with comments | « chrome/browser/resources/shared/css/menu.css ('k') | chrome/browser/resources/shared/js/cr/ui/menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698