Closed Bug 1766975 Opened 3 years ago Closed 3 years ago

Add keyboard shortcut to focus the filter input

Categories

(DevTools :: Style Editor, enhancement)

enhancement

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

In other panels, we often have a global keyboard shortcut (most of the time, Ctrl|Cmd+F) that focuses a filter input we might have there (e.g. in inspetcor, console, netmonitor).
It would be nice to have similar behavior in the style editor as well.
The only thing we need to take care of is that when the focus is in a stylesheet (so in a code mirror instance), Ctrl|Cmd+F will trigger a in-file search, which we still want to have.

I think it would be reasonable to use the same shortcut we have in the debugger to search for a given file (Ctrl|Cmd+P), even though in the debugger case, it opens the command palette.

We using Ctrl|Cmd+P as Ctrl|Cmd+F is used for a in-file search in
the CodeMirror instance.
We're tesing the keyboard shortcut in browser_style_editor_filter.js
by using it instead of manually calling input.focus and clearing it
programatically.

Depends on D144930

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d915f68a1f13 [devtools] Add keyboard shortcut to focus StyleEditor filter input. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: