Closed
Bug 902990
Opened 12 years ago
Closed 6 years ago
Hitting escape with focus in the inspector's filter field doesn't hide the side panel
Categories
(DevTools :: Object Inspector, defect, P3)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: canuckistani, Unassigned)
Details
Steps to repro:
1. open the console, type 'inspect(console)', hit TAB twice to focus the filter field
2. until bug 843019 is fixed, hit esc once to enable filtering
3. type 'grou' or similar to filter the list
4. hit escape to clear the filter field
5. hit escape again to hide the side-panel - doesn't work
Workaround:
1. hit tab to focus into the variable viewer
2. hit escape to hide the side-panel
When I'm focused in the filter field, why does escape clear the current filter? I discovered this by accident. It feels like the more consistent thing to do would be to
a) let the user edit text in the field similarly to other text fields and
b) bind escape to hide the panel, similar to how the rest of the panel works
![]() |
||
Comment 1•12 years ago
|
||
An alternate option would be for escape to clear the text, or if the filter is already empty, then close the sidebar. That way at worst you could hit escape multiple times to back out.
![]() |
Reporter | |
Comment 2•12 years ago
|
||
Is there some other tool where escape clears text? This certainly isn't the case for the search field in Firefox. This seems novel, I'd at least like to understand why it's there.
Comment 3•11 years ago
|
||
(In reply to Jeff Griffiths (:canuckistani) from comment #2)
> Is there some other tool where escape clears text?
It’s a convention for search fields, at least nowadays. OSX and Windows do it. Chrome, Safari and Internet Explorer do it for <input type="search"> (I opened Bug 1055085 for doing the same in Firefox).
In Firefox, “Clear on ESC” is used for the Awesomebar and almost all XUL search boxes. I’m not sure if it’s a default behavior of <xul:textbox type="search" /> or if it was added manually in a lot of places.
I found two instances of a search box that doesn't clear on ESC in the Firefox UI:
- The main Search box (-> bug 1055030).
- The Find bar.
Comment 4•11 years ago
|
||
(In reply to Brandon Benvie [:benvie] from comment #1)
> An alternate option would be for escape to clear the text, or if the filter
> is already empty, then close the sidebar. That way at worst you could hit
> escape multiple times to back out.
Yes, that would be the way to go. Except it’s probably not necessary to do “close the sidebar” from the event listener that clears the text. Letting the event bubble up should be enough.
In pseudocode:
if (key is ESC and there’s no modifyer) {
if (event.currentTarget.value !== '') {
event.stopPropagation();
event.currentTarget.value = '';
}
}
If there’s nothing to clear, don’t stop event propagation -> an event listener higher up catches it and hides the object inspector.
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•7 years ago
|
Priority: -- → P3
Comment 5•6 years ago
|
||
console does not use the variable view anymore.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•