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 ce31f6517b5021a2f723028df2e1b5a2805e0809..ab07f6c19d7e4d050b7a7cfca03fc8282db3d9f3 100644 |
--- a/ui/webui/resources/js/cr/ui/context_menu_handler.js |
+++ b/ui/webui/resources/js/cr/ui/context_menu_handler.js |
@@ -154,7 +154,9 @@ cr.define('cr.ui', function() { |
case 'mousedown': |
if (!this.menu.contains(e.target)) { |
this.hideMenu(); |
- if (e.button == 0 /* Left click */) { |
+ if (e.button == 0 /* Left button */ && (cr.isLinux || cr.isMac)) { |
+ // Emulate Mac and Linux, which swallow native 'mousedown' events |
+ // that close menus. |
e.preventDefault(); |
e.stopPropagation(); |
} |