Open Bug 1552274 Opened 5 years ago Updated 4 months ago

Make DevTools shortcuts work when DevTools are open, no matter if content or tools are focused

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned, NeedInfo)

References

(Blocks 2 open bugs)

Details

Attachments

(1 obsolete file)

What were you doing?

  1. Cmd-P with Debugger open but content focused.

What happened?

Print dialog.

What should have happened?

Debugger file dialog opens.

Anything else we should know?

Same applies to other shortcuts that should probably be treated global.

Related: https://twitter.com/piotrpalek/status/1129067891058511872

Summary: Make DevTools shortcuts when DevTools are open, no matter if content or tools are focussed → Make DevTools shortcuts work when DevTools are open, no matter if content or tools are focused
Blocks: dbg-frontend
Priority: -- → P3

This seems surprising to me. While I understand the desire, if the main content window is focused, I don't think it should be able to intercept shortcuts in general, and it seems equally surprising to intercept some specific subset of shortcuts.

Making a better case here:

  • For all other browser shortcuts, if the website does not intercept them, the browser handles them. Example would be Slack catching Cmd-K, preventing me from using the shortcut for awesomebar's tab switching. DevTools is a top-level browser feature and should adopt this paradigm. The event bubbling order would be content > devtools > browser
  • Low risk: Given the bubbling and cancelling of keyboard event, this would not break content but just catch more DevTools shortcuts that would be ignored when fired in content.
    • Commonly used shortcuts like Delete, ESC need some special considerations and testing and might only when with devtools focused
  • Focus state is not something that is always clearly visible in the UI, so having devtools behave line a website, where users have to double-check that the content has focus is not an easy visual check but often requires a just-to-be-sure click in the UI.
  • Some shortcuts in DevTools, like Cmd-Shift-C are handled globally and some not – and the UI does not show them any different.

Martin & Victoria for more product/design input.

Flags: needinfo?(victoria)
Flags: needinfo?(mbalfanz)

I agree that currently it's not really obvious if DevTools is focused or not. The suggestion of content > devtools > browser would make keyboard shortcuts more predictable.

Flags: needinfo?(mbalfanz)
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713

I'd expect that the debugger would pause when the debugger is open when I press F8, but nothing happens. I believe the issue is related. This is extremely annoying, as I can no longer pause and investigate the DOM during drag/hover, etc.

Severity: normal → S3
See Also: → 1540249
Attachment #9386242 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: