New issue
Advanced search Search tips

Issue 821285 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression : Unable to close DevTools using 'F12' key if Cast overlay is open

Reported by rp...@etouch.net, Mar 13 2018

Issue description

Version: 67.0.3368.0 Revision0f36d3901569535a63173a1835f8dfbcf7b66d60-refs/heads/master@{#542340}(32/64-bit)
OS: Windows (7,8,8.1,10),Linux (14.04 LTS)

What steps will reproduce the problem?
1. Launch chrome, navigate to NTP and right click to open context menu and select 'Cast'
2. Now press 'F12' to open devtools window and then again press 'F12' key to close it,observe

Actual: Unable to close devtools window after pressing 'F12' key if cast overlay is open.
Expected: Should be able to close devtools window after pressing 'F12' key if cast overlay is open

This is regression issue, broken in ‘M 66’ and below is the bisect info :
Good build:66.0.3342.0
Bad build: 66.0.3343.0

Narrow Bisect:
https://chromium.googlesource.com/chromium/src/+log/fa5073fcdb7ee8c502b5501af46f08d2a3c408a7..e90821a3528e187a9c395750093947f9fb49dde8?pretty=fuller&n=50
(Unable to narrow down the range using per-revision bisect as chrome build crashes after launch)

Suspect: r534915? from Narrow bisect

@elawrence: Could you please look into the issue, pardon me if it has nothing to do with your changes and if possible please assign it to concern owner.

Note: 
1. Above issue is also seen on latest Dev M-66 (# 66.0.3359.26)
2. Issue is not seen on Mac OS X(10.12.6,10.13.1,10.13.4)


 
Actual_video.mp4
727 KB View Download
Expected_video.mp4
525 KB View Download
Summary: Regression : Unable to close DevTools using 'F12' key if Cast overlay is open (was: Regression : Unable to close devtools window after pressing 'F12' key if cast overlay is open.)
By-design, the CL cited in #0 changes the behavior of the F12 key to focus the window being debugged; this key is the accelerator for the "Focus Debuggee" command which now appears in the drawer when the Developer tools are undocked.

Unintentionally, however, the behavior of an F12 keypress changes even when the tools are docked and the "Focus Debuggee" menu command is NOT present. This manifests in two different ways:

 1. If the Cast overlay is not open, you must hit F12 *twice* to close the Developer Tools. The first time you hit F12, it focuses the page. The second time, the Developer Tools close. 

  Alternatively, you can click into the page once and hit F12 and the Developer Tools close.

 2. If the Cast overlay is open, hitting F12 does not close the tools because the page cannot be focused because the Cast overlay is modal to the tab.

Pavel, is there some way I can change Main.js such that, if the Developer Tools are docked, the action with actionID "inspector_main.focus-debuggee" is disabled (thus unbinding the hotkey)? Or should I change the behavior of FocusDebuggeeActionDelegate such that if it's fired when the tools are docked, the tools are simply closed instead of focusing the page?
Cc: pfeldman@chromium.org
+pfeldman to help with my question in #1.
I haven't found a straightforward way to fix this.

1. Returning |false| from InspectorMain.FocusDebuggeeActionDelegate.handleAction does not restore the default F12 hotkey handling behavior (e.g. the shortcut key doesn't "bubble").

2. Disabling the action, via 

  UI.actionRegistry.action('inspector_main.focus-debuggee').setEnabled(false);

...does not prevent the shortcut key from invoking the action. Disabling the action also doesn't appear to disable the context menu item added by |contextMenu.defaultSection().appendAction| either; only Toolbar buttons seem to behave differently when their underlying actions are disabled.

3. The ShortcutRegistry doesn't seem to have any sort of unregisterShortcut method.
We should just remove the shortcut from the new action. I did not realize it was overriding the default toggle devtools behavior. Focus debuggee will only be available over the command menu, which is fine...
It was nice to be able to flip between the undocked DevTools window and the Debuggee by just hitting F12 repeatedly (matching what Edge does), but absent a workaround, I'll just remove the shortcut key.

Should I file a different bug about the Action's enabled state not impacting its shortcut key and invocation behavior? I also noticed that the CTRL+SHIFT+P picker lists and executes disabled actions.
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 12 2018

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

commit b0f3a6bd2b46f98007eedf120865687f7b104311
Author: Eric Lawrence <elawrence@chromium.org>
Date: Thu Apr 12 20:03:00 2018

DevTools: Remove binding of F12 key to Focus Debuggee command

Devtools keybindings to Actions are not disabled when the associated
command is disabled. The recently added Focus Debuggee command used F12
as a key binding but this had undesirable behavior when the DevTools
were docked in the browser window. This CL removes the F12 key binding.

Bug:  821285 
Change-Id: I6acd66e01ba9a8ef3a8a082bd18e7da569ff347f
Reviewed-on: https://chromium-review.googlesource.com/1010469
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550328}
[modify] https://crrev.com/b0f3a6bd2b46f98007eedf120865687f7b104311/third_party/blink/renderer/devtools/front_end/main/module.json

Labels: TE-Verified-M67 TE-Verified-67.0.3396.0
Update : 
Retested above issue on Windows(7,8,8.1,10), Linux(14.04 LTS) OS using latest Canary #67.0.3396.0 and issue is fixed. 
Kindly refer the attached screen-cast.
Thank you!
Current_Behaviour.mp4
656 KB View Download
Status: Verified (was: Started)
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0f3a6bd2b46f98007eedf120865687f7b104311

commit b0f3a6bd2b46f98007eedf120865687f7b104311
Author: Eric Lawrence <elawrence@chromium.org>
Date: Thu Apr 12 20:03:00 2018

DevTools: Remove binding of F12 key to Focus Debuggee command

Devtools keybindings to Actions are not disabled when the associated
command is disabled. The recently added Focus Debuggee command used F12
as a key binding but this had undesirable behavior when the DevTools
were docked in the browser window. This CL removes the F12 key binding.

Bug:  821285 
Change-Id: I6acd66e01ba9a8ef3a8a082bd18e7da569ff347f
Reviewed-on: https://chromium-review.googlesource.com/1010469
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550328}
[modify] https://crrev.com/b0f3a6bd2b46f98007eedf120865687f7b104311/third_party/blink/renderer/devtools/front_end/main/module.json

Cc: elawrence@chromium.org
 Issue 838762  has been merged into this issue.

Comment 12 by caseq@chromium.org, May 14 2018

 Issue 842630  has been merged into this issue.

Sign in to add a comment