Open Bug 1561585 Opened 7 years ago Updated 6 years ago

Clear all search or filter inputs on Escape key

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: fvsch, Unassigned)

References

Details

The Escape shortcut to clear text inputs is handled in some inputs but not all.

The expected behavior is:

  1. If the input has focus and a non-empty value, clear that value.
  2. If the input has focus and an empty value, let the Esc key be handled by the panel (e.g. to close a modal or toggle the Split Console).

Ideally we should check if there is a modifier, so that Shift+Esc, Ctrl+Esc, Cmd+Esc, Alt+Esc etc. don't clear

We want this behavior for short text inputs that perform a search or maybe ones that enter a new value too. We probably should not use it for editing inputs and textearas, where we already use Escape to mean "cancel editing", or in the Console's main input.

Inspector:

  • Markup > Search HTML: to be fixed
  • Rules > Filter Styles: OK
  • Rules > Add new class: to be fixed?
  • Computed > Filter Styles: OK
  • Fonts > Font preview text: to be fixed

Console:

  • Filter output: to be fixed

Network:

  • Filter URLs: to be fixed
  • Headers > Filter headers: to be fixed
  • Cookies > Filter cookies: to be fixed
  • Params > Filter request parameters: to be fixed
    (Network details handle the ESC key in different ways, sometimes it closes the details pane and sometimes it doesn't and triggers the Split Console instead.)

Storage:

  • Filter items: to be fixed

Style Editor:

  • Search in file: ESC key hides the search input. When searching again the previous input is still there, but selected so that typing replaces it. This behavior is consistent with e.g. VS Code, let's keep it that way.

Debugger:

  • Search in file: ESC key hides the search input, which is consistent with e.g. VS Code. When searching again the previous input is cleared -> filed as bug 1561583

The priority flag is not set for this bug.
:pbro, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbrosset)
Flags: needinfo?(pbrosset)
Priority: -- → P3

Maybe we should make this a meta, so we can check the panels off one by one.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Console
Component: Console → General

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)
Severity: normal → S3
Flags: needinfo?(odvarko)
Depends on: 1647331
You need to log in before you can comment on or make changes to this bug.