Issue metadata
Sign in to add a comment
|
Switching away and back from window with permission bubble changes File shortcuts on OSX |
||||||||||||||||||||||
Issue descriptionChrome 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.
,
Nov 22 2016
,
Nov 29 2016
,
Nov 10 2017
,
Nov 16 2017
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.
,
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.
,
Nov 16 2017
uhh - the method is now called "adjustCloseWindowMenuItemKeyEquivalent" https://cs.chromium.org/chromium/src/chrome/browser/app_controller_mac.mm?q=adjustCloseWindowMenuItemKeyEquivalent&sq=package:chromium&l=575
,
Feb 18 2018
,
Oct 11
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).
,
Oct 11
Trent, does either of those sound like an easy fix?
,
Oct 12
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 |
|||||||||||||||||||||||
Comment 1 by lgar...@chromium.org
, Jul 8 2016