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

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

Issue 1431103003: Chrome Apps Page: Fixed issue with app focusing and context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: 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 10cb77c69ab0331196d81ca89ce1ef3d7bcc8620..0c9bb7ad9d17040d4ce42d0f288364f6ff1454a7 100644
--- a/ui/webui/resources/js/cr/ui/context_menu_handler.js
+++ b/ui/webui/resources/js/cr/ui/context_menu_handler.js
@@ -152,8 +152,13 @@ cr.define('cr.ui', function() {
switch (e.type) {
case 'mousedown':
- if (!this.menu.contains(e.target))
+ if (!this.menu.contains(e.target)) {
this.hideMenu();
+ if(e.button == 0 /* Left click */) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ }
else
e.preventDefault();
break;
« chrome/browser/resources/ntp4/tile_page.js ('K') | « chrome/browser/resources/ntp4/tile_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698