CTRL+Shift+Z shortcut for opening Debugger clashes with "Redo" action in Inspector
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: kasprzyk, Unassigned)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
- Edited something in DOM tree in Inspector, for example I added a class to a node.
- Pressed Ctrl+Z to undo a change.
- Pressed Ctrl+Shift+Z to redo a change.
Actual results:
Debugger tab opened.
Expected results:
Redo action should trigger, a change should be "redone".
I believe just changing the shortcut to some different could be a solution.
I also tried using an Shortkeys extension (https://addons.mozilla.org/pl/firefox/addon/shortkeys/) to disable a shortcut with no luck.
I also discovered that manually selecting 'Redo' menu item under 'Edit' seems to work as expected.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
The Debugger shortcut was last updated in Bug 1583042 because of another conflict, at that time the shortcut was ctrl+shift+L
But ctrl+shift+Z is a commonly used shortcut for redo in various software, so it seems wrong to use it here.
As a comparison, Chrome doesn't provide any shortcut for the Sources panel (which is the closest to our Debugger panel), according to https://developer.chrome.com/docs/devtools/shortcuts/ . In fact they don't provide a lot of shortcuts to select specific panels.
There are 3 options:
- make sure to catch the keyboard event from the markup view so that it doesn't get captured by the debugger
- find another shortcut
- remove the shortcut
I suggest to potentially implement the first one, and then directly move on to the 3rd one as part of the effort to reduce the amount of shortcuts in DevTools (Bug 1439740).
Comment 4•4 years ago
|
||
It's interesting to note that CTRL+SHIFT+Z doesn't work in many places in windows:
- it doesn't work when devtools are not opened (I guess Firefox catches it)
- it doesn't work from the Console input
- it doesn't work from the Style editor
- (... it doesn't work from any input field basically)
So for this shortcut to work, you need to have devtools open, and your focus needs to be on something else than an input field.
Removing the shortcut seems like a fair option considering how inconsistent it is at the moment.
Comment 5•4 years ago
|
||
Forgot to say, but thanks for reporting the bug kasprzyk!
Comment 6•4 years ago
|
||
The current shortcut rarely works on Windows, as it overlaps with a basic editor shortcut
(In reply to Julian Descottes [:jdescottes] from comment #5)
Forgot to say, but thanks for reporting the bug kasprzyk!
You're welcome! Thank You for reacting!
(In reply to Julian Descottes [:jdescottes] from comment #3)
There are 3 options:
- make sure to catch the keyboard event from the markup view so that it doesn't get captured by the debugger
- find another shortcut
- remove the shortcut
I suggest to potentially implement the first one, and then directly move on to the 3rd one as part of the effort to reduce the amount of shortcuts in DevTools (Bug 1439740).
I would try to find another shortcut, but I know it may not be that easy. The first option seems to me be harder to implement and I have a feeling it may break again in the future. I may be wrong though.
I have had an idea about Dev Tools hotkeys in general: I thought that maybe panels in Dev Tools could be treated just as typical tabs, so it would be possible to select them with <Some modifier key or keys>+[0-9] when Dev Tools are open - and possibly focused. I think it may simplify the Dev Tools hotkeys issue in general. It's just an idea though.
Comment 8•4 years ago
|
||
(In reply to kasprzyk from comment #7)
I have had an idea about Dev Tools hotkeys in general: I thought that maybe panels in Dev Tools could be treated just as typical tabs, so it would be possible to select them with <Some modifier key or keys>+[0-9] when Dev Tools are open - and possibly focused. I think it may simplify the Dev Tools hotkeys issue in general. It's just an idea though.
I just discovered this recently but you can cycle through panels using "Ctrl + [" and "Ctrl + ]" (Cmd on macos)
Oh, wow, thank You. It looks like one step towards the idea I presented really. ;)
Comment 10•1 year ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #4)
It's interesting to note that CTRL+SHIFT+Z doesn't work in many places in windows:
- it doesn't work when devtools are not opened (I guess Firefox catches it)
- it doesn't work from the Console input
- it doesn't work from the Style editor
- (... it doesn't work from any input field basically)
So for this shortcut to work, you need to have devtools open, and your focus needs to be on something else than an input field.
Removing the shortcut seems like a fair option considering how inconsistent it is at the moment.
That is interesting Julian, because on Linux, Ctrl+Shift+Z works in all of those places:
Linux (X11) Ctrl+Shift+Z Behavior when:
- devtools not opened: Executes Redo, as expected, unless site is blocked from overriding keyboard shortcuts, then Debugger is opened AND Redo is NOT executed, see bug 1913209
- at Console input: Executes Redo & opens Debugger
- in Style editor: same behavior as Console input
- in Inspector, while still actively editing: Opens Debugger & does NOT execute redo & ⚠️commits changes⚠️ that were pending in the Inspector, not expected, data loss
- in Inspector, after committing changes (by pushing enter or changing focus, for example) and then undoing those changes with Ctrl+Z: same behavior as Console input, Executes Redo & opens Debugger
Actually, it works on most input fields here, except:
- Inspector/Rules tab, see bug 773510 (unless you haven't yet committed changes by pushing enter or changing focus)
- perhaps others...
Ctrl+Y is also widely supported across different apps as a Redo shortcut, and I've noted:
Linux (X11) Ctrl+Y Behavior when:
- devtools not opened: Executes Redo, as expected, even if site is blocked from overriding keyboard shortcuts.
- at Console input: Executes Redo, as expected
- in Style editor: Executes Redo, as expected
- in Inspector, while still actively editing: Executes Redo, as expected
- in Inspector, after committing changes and then undoing those changes with Ctrl+Z: No effect, not expected.
- Inspector/Rules tab, no effect since Ctrl+Z has no effect either.
😵
Description
•