Commit 3ce9680f authored by yamaguchi's avatar yamaguchi Committed by Commit bot

Stop blocking the mousedown event of left click when closing context menu.

This change will enable to choose a file and close a context menu
simultaneously by a single click in the file list of the Files app.

Before this change, only the mousedown event of a left click which
dismisses the context menu of cr.ui was blocked its propagation.
It was introduced by https://codereview.chromium.org/1431103003,
which was been directed to 487194 and 507681.
This change will partially remove the change made by that, however,
I think Issue 507681 was resolved by the change to apps_page.js, and
487194 was done by that of title_page.js in the original change.
I confirmed that the both issues doesn't reappear by this change.

BUG=679982
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2800383002
Cr-Commit-Position: refs/heads/master@{#464285}
parent c035f184
......@@ -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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment