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

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

Issue 1092933004: Swallow double-click events on menu buttons in Web UI in chrome://bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving merge conflict. Created 5 years, 8 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: ui/webui/resources/js/cr/ui/menu_button.js
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js
index 3f084b5f75375a6059bab84a6d59eb48c7c4c92c..e7f9804309c452f633e4dd7c203d809554584023 100644
--- a/ui/webui/resources/js/cr/ui/menu_button.js
+++ b/ui/webui/resources/js/cr/ui/menu_button.js
@@ -44,6 +44,7 @@ cr.define('cr.ui', function() {
decorate: function() {
this.addEventListener('mousedown', this);
this.addEventListener('keydown', this);
+ this.addEventListener('dblclick', this);
// Adding the 'custom-appearance' class prevents widgets.css from changing
// the appearance of this element.
@@ -162,6 +163,11 @@ cr.define('cr.ui', function() {
// Don't allow elements further up in the DOM to show their menus.
e.stopPropagation();
break;
+ case 'dblclick':
+ // Don't allow double click events to propagate.
+ e.preventDefault();
+ e.stopPropagation();
+ break;
}
},
« 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