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

Issue 626527 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug
Team-Security-UX



Sign in to add a comment

Switching away and back from window with permission bubble changes File shortcuts on OSX

Project Member Reported by lgar...@chromium.org, Jul 8 2016

Issue description

Chrome 53.0.2783.5 
OSX 10.11.5

What steps will reproduce the problem?
(1) Visit https://permission.site
(2) Click on "Location" to trigger a permission bubble, leave it open.
(3) Click on another Chrome window
(4) Click on the permission bubble (specifically the permission bubble; other places in the same window don't trigger the bug).
(5) Click on the "File" menu.

What is the expected output?
The shortcuts in the File menu don't change. (actual.png)

What do you see instead?
The shortcuts in the File menu change! :-?
In particular, "Close Tab" doesn't exist anymore, and "Close Window" has stolen its shortcut of Cmd-W (expected.png).

Because of  Issue 626525 , trying to press Cmd-W does nothing if you do it during step 4 (although it does work during step 5). But if  Issue 626525  were hypothetically fixed, someone trying to close the tab would accidentally close the whole window.

I guess the permission bubble is kind of being treated like a window without individual tabs if you directly switch to it from another window.

Really weird, comes with  Issue 626525  as a mitigation, and probably not worth fixing, but I thought I'd file a bug in case we get around to  Issue 626525  at some point.
 
expected.png
140 KB View Download
actual.png
133 KB View Download
Components: Security>UX UI>Browser>Permissions
Components: -Security>UX UI>Browser>Permissions>Prompts

Comment 3 by raymes@chromium.org, Nov 29 2016

Components: -UI>Browser>Permissions

Comment 4 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Cc: tapted@chromium.org dominickn@chromium.org
 Issue 626525  is now fixed, but it doesn't affect this bug. That means that the very bad case of closing your whole window when you're trying to close a tab doesn't happen; the tab just doesn't close using the Ctrl-W keyboard shortcut if you're in this state.

However, the *only* way to trigger this bug is by clicking on the permission bubble itself to bring the window with the bubble back in focus. Clicking anywhere else in the window is fine. Using Alt-~ to switch to the window is also fine, as is using Mission Control. In all of these cases, switching to the window and using Ctrl-W just closes the tab - it's not intercepted by the permission bubble. Also, Esc works to dismiss the permission bubble as well.

I talked this over with tapted and he agrees it's so obscure that it's not worth fixing right now. Possibly could be revisited in future.

Comment 6 by tapted@chromium.org, Nov 16 2017

This has been around forever - see e.g.  Issue 302117  . There's some diagnosis there - 

"""
there is some code in app_controller_mac.mm `fixCloseMenuItemKeyEquivalents` [1] which is called asynchronously, after a delay and triggered when window focus changes. Noticed it while fixing   Issue 262848   (in https://codereview.chromium.org/127343004/)

I suspect fixCloseMenuItemKeyEquivalents is the cause, but the fix for this isn't obvious 

[1] https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/app_controller_mac.mm&q=fixCloseMenuItemKeyEquivalents&sq=package:chromium&l=493
"""

I don't think it's anything special about bubbles, permissions, or MacViews.

Comment 8 by est...@chromium.org, Feb 18 2018

Labels: -Hotlist-EnamelAndFriendsFixIt
In the meantime, the situation has changed. Now there are two, slightly different, and disparate problems:

 1) As long as the bubble has focus (regardless of whether the parent Chrome window has an activated title bar or not), closing the window (Cmd + Shift + W) does not work, nor does picking this menu item from the File menu do anything.

 2) Closing the tab seems to always work, but in the edge case when the bubble has focus and the parent window is not activated, doesn't have an associated accelerator, because Cmd + W is mapped to "Close window", not "Close tab". But it does not do anything as per (1).
Trent, does either of those sound like an easy fix?
How do you get into state 2.?

For 1. I agree Cmd+Shift+w should close the browser window. For me it does seem to do this? (however you're right the menu item does not work - that's a bug).

I don't know what the fix is, or whether it will be easy, since I don't know what's causing the bug.

Sign in to add a comment