Clicking the X button after searching in the variables view doesn't clear the filter

RESOLVED FIXED in Firefox 41

Status

()

Firefox
Developer Tools: Object Inspector
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: bgrins, Assigned: ochameau)

Tracking

40 Branch
Firefox 42
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox41 fixed, firefox42 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

3 years ago
STR:

* Run this in the console: let a = {a:1,b:1}; inspect(a)
* Search for 'b' in the variables view search box
* Press the X in the search box

Expected:
All object properties are visible

Actual:
The filter is still applied ('b' is the only prop visible)
(Reporter)

Updated

3 years ago
See Also: → bug 1169096
(Assignee)

Updated

3 years ago
Assignee: nobody → poirot.alex
(Assignee)

Comment 1

3 years ago
Created attachment 8617394 [details] [diff] [review]
Fix clear button in variable view.

The xul textbox being used here, doesn't dispatch `input` events when we click on the clear button.
But it does dispatch a `command` event. Other tools are listening to this event.
It also has the benefit to merge multiple keypress into a single event once user stops typing.
(Assignee)

Comment 2

3 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4df6d850e16d
(Reporter)

Comment 3

3 years ago
(In reply to Alexandre Poirot [:ochameau] from comment #1)
> Created attachment 8617394 [details] [diff] [review]
> Fix clear button in variable view.
> 
> The xul textbox being used here, doesn't dispatch `input` events when we
> click on the clear button.
> But it does dispatch a `command` event. Other tools are listening to this
> event.
> It also has the benefit to merge multiple keypress into a single event once
> user stops typing.

Do they have to press 'enter' for the event to fire, or does it automatically fire after they stop typing for some amount of time?
(Reporter)

Updated

3 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 4

3 years ago
It automatically fires after you stop typing.
(Assignee)

Comment 5

3 years ago
Created attachment 8628803 [details] [diff] [review]
Fix clear button in variable view

Fixed test, green try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6947b934775f
Attachment #8617394 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Attachment #8628803 - Flags: review?(bgrinstead)
(Reporter)

Comment 6

3 years ago
Comment on attachment 8628803 [details] [diff] [review]
Fix clear button in variable view

Review of attachment 8628803 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine to me.  Needs minor rebasing on the test files

::: browser/devtools/debugger/test/head.js
@@ +495,5 @@
>    aElement.focus();
>    EventUtils.sendString(aText, aElement.ownerDocument.defaultView);
>  }
>  
> +function sendCommand(aElement) {

Could you just call aElement.doCommand() instead of using this function?

@@ +498,5 @@
>  
> +function sendCommand(aElement) {
> +  let doc = aElement.ownerDocument;
> +  let ev = doc.createEvent("XULCommandEvent");
> +  ev.initCommandEvent("command", true, true, doc.defaultView, 0, false, false, false, false, null);

Nit: 80 chars
Attachment #8628803 - Flags: review?(bgrinstead) → review+
(Assignee)

Comment 7

3 years ago
Created attachment 8631541 [details] [diff] [review]
Fix clear button in variable view

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5f66d1bf589

(In reply to Brian Grinstead [:bgrins] from comment #6)
> Comment on attachment 8628803 [details] [diff] [review]
> ::: browser/devtools/debugger/test/head.js
> @@ +495,5 @@
> >    aElement.focus();
> >    EventUtils.sendString(aText, aElement.ownerDocument.defaultView);
> >  }
> >  
> > +function sendCommand(aElement) {
> 
> Could you just call aElement.doCommand() instead of using this function?
> 

Sure!

Comment 8

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/682a89113d92
sorry had to back this out in https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=682a89113d92 for timeouts https://treeherder.mozilla.org/logviewer.html#?job_id=3716320&repo=fx-team that started with this changes
Flags: needinfo?(poirot.alex)

Comment 10

3 years ago
Backout:
https://hg.mozilla.org/integration/fx-team/rev/6d46cf52207f

Comment 11

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/3d91af004e43
https://hg.mozilla.org/mozilla-central/rev/3d91af004e43
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
(Assignee)

Updated

2 years ago
Attachment #8628803 - Attachment is obsolete: true
Flags: needinfo?(poirot.alex)
(Assignee)

Comment 13

2 years ago
Comment on attachment 8631541 [details] [diff] [review]
Fix clear button in variable view

Same request as bug 1169096. This patch goes along with it. If we don't include this additional fix, bug 1169096 behaves badly.
Attachment #8631541 - Flags: review+
Attachment #8631541 - Flags: approval-mozilla-aurora?
Comment on attachment 8631541 [details] [diff] [review]
Fix clear button in variable view

Approved as it has automated tests, and been in m-c for a week.
Attachment #8631541 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/329cce06a9a8
status-firefox41: --- → fixed
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.