New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617895 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Tab closes on middle mouse click even if edit bookmark dialog box is open.

Reported by vku...@etouch.net, Jun 7 2016

Issue description

Chrome Version:53.0.2761.2 (Official Build)Revision 605ae590e7a3e805a4dda7e9487caeb06827c8aa-refs/branch-heads/2761@{#3} (64-bit)
OS:Mac (10.10.5 , 10.11.4),Mac Retina (10.11.4)

What steps will reproduce the problem?
1.Launch chrome and open 2-3 webpages, bookmark any webpage.
2.Right click on bookmark page and click on 'edit' option from context menu.
3.Middle mouse click on previous/next tab and observe.

Actual: Tab closes on middle mouse click even if edit bookmark dialog box is open.

Expected: Tab should not close on middle mouse click if edit bookmark dialog box is open.

This is a Non-regression issue seen from 'M30' series (Chrome version: 30.0.1549.0)

Note: Issue not seen on Win & Linux OS.
 
Actual_Result.mov
1.2 MB Download
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on mac 10.11 chrome version 53.0.2761.2 - Tab closes on middle mouse click with edit bookmark dialog box open.
This is also the case with Open/Save file dialogs. While left click is disabled, middle click for closing tabs works.
Cc: tapted@chromium.org
Components: -UI>Browser>Bookmarks IO>Mouse
Trent, can you help triage this?

Comment 4 by tapted@chromium.org, Jun 10 2016

Cc: -tapted@chromium.org rsesek@chromium.org
Labels: -Pri-2 -M-53 Hotlist-Polish Hotlist-GoodFirstBug Pri-3
Owner: tapted@chromium.org
Status: Assigned (was: Untriaged)
This has been around since forever, so it's probably not high priority. It would be good to fix it though.

Interestingly, it also happens in a full MacViews browser.

I guess I should take it - my CL in https://codereview.chromium.org/1354873002/ probably even fixes this already - that's for  Issue 528871 . But I don't think that CL will fix the views browser. Also I need to actually address Robert's review comment :p

This is also kinda the same as  Issue 29945  from 6.5 years ago. Chrome would crash back then - at least that doesn't happen any more.

 Issue 40809  is probably obsolete too. Also  Issue 65803  which is in Robert's queue. I wonder why all those ancient issues didn't get pinged by the Hotlist-Recharge goo.

Comment 5 by tapted@chromium.org, Jun 10 2016

Cc: sh...@chromium.org
 Issue 29945  has been merged into this issue.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ceec40ad0ad238b6e37d1c18f478cee122b353b0

commit ceec40ad0ad238b6e37d1c18f478cee122b353b0
Author: tapted <tapted@chromium.org>
Date: Mon Jun 20 01:02:30 2016

Mac: Prevent mouse events reaching subviews while a window has an attached Sheet

It's currently possible to show a context menu for just about anything
in Chrome while the window has a modal sheet displayed (the exception is
the tab strip, which has a check in -[TabView menu]). This makes all
sorts of weird stuff possible, like showing a `Print` dialog for the
webcontents over the supposedly modal `Edit bookmark` dialog.

To fix, have the shared (and mostly boring) ancestor view, class
FastResizeView, override -[NSView hitTest:] to return itself when the
window has an attached sheet. This nerfs the context menus. (note: zoom
still works: that's handled by -[NSWindow sendEvent:] and seems to do
separate hit-testing when a sheet is displayed).

The TabStrip is in the titlebar, not a subview of FastResizeView, so it
also needs to check. This makes the check in -[TabView menu] obsolete.
We can't check "higher up" since the buttons in the window frame should
behave as before.

Note the mainMenu still functions as before. So a print dialog can still
be displayed. Just not via a context menu.

BUG= 528871 ,  617895 
TEST=Right-click the bookmarks toolbar and open a modal dialog (e.g.
Edit..., Add Page..., Add Folder...). Then:

- Right-clicking in the omnibox,tab strip or elsewhere shouldn't show a
context menu.
- Middle-clicking shouldn't close a tab.

Review-Url: https://codereview.chromium.org/1354873002
Cr-Commit-Position: refs/heads/master@{#400621}

[modify] https://crrev.com/ceec40ad0ad238b6e37d1c18f478cee122b353b0/chrome/browser/ui/cocoa/fast_resize_view.mm
[modify] https://crrev.com/ceec40ad0ad238b6e37d1c18f478cee122b353b0/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
[modify] https://crrev.com/ceec40ad0ad238b6e37d1c18f478cee122b353b0/chrome/browser/ui/cocoa/tabs/tab_view.mm

Comment 7 by tapted@chromium.org, Jun 22 2016

Status: Fixed (was: Assigned)

Sign in to add a comment