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

Unified Diff: ui/webui/resources/js/cr/ui/context_menu_handler.js

Issue 1358893003: Ignore mouseup shortly after showing cr.ui.Menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix context menus Created 5 years, 3 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/test/data/webui/menu_test.html ('k') | ui/webui/resources/js/cr/ui/menu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/context_menu_handler.js
diff --git a/ui/webui/resources/js/cr/ui/context_menu_handler.js b/ui/webui/resources/js/cr/ui/context_menu_handler.js
index 1ff7b6ed38bb0b3582eda6093fc23fbf78c6ab98..10cb77c69ab0331196d81ca89ce1ef3d7bcc8620 100644
--- a/ui/webui/resources/js/cr/ui/context_menu_handler.js
+++ b/ui/webui/resources/js/cr/ui/context_menu_handler.js
@@ -43,7 +43,7 @@ cr.define('cr.ui', function() {
this.menu_ = menu;
menu.classList.remove('hide-delayed');
- menu.hidden = false;
+ menu.show({x: e.screenX, y: e.screenY});
menu.contextElement = e.currentTarget;
// When the menu is shown we steal a lot of events.
@@ -80,7 +80,7 @@ cr.define('cr.ui', function() {
menu.classList.add('hide-delayed');
else
menu.classList.remove('hide-delayed');
- menu.hidden = true;
+ menu.hide();
var originalContextElement = menu.contextElement;
menu.contextElement = null;
this.showingEvents_.removeAll();
« no previous file with comments | « chrome/test/data/webui/menu_test.html ('k') | ui/webui/resources/js/cr/ui/menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698