Closed Bug 719039 Opened 12 years ago Closed 12 years ago

After the Highlighter was refactored, ESCAPE key closes Inspector when Tilt is open

Categories

(DevTools :: Inspector, defect)

12 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 12

People

(Reporter: vporof, Assigned: vporof)

References

Details

(Whiteboard: [tilt])

Attachments

(1 file, 3 obsolete files)

Until now, the behavior was:

Inspector open             + ESCAPE pressed = Inspector closed
Inspector open & Tilt open + ESCAPE pressed = only Tilt closed

So currently, if Tilt is open and ESCAPE is pressed, we're not returning back to the Highlighter, but closing Inspector altogether. If this is the desired behavior, we can remove some redundant code from Tilt. However, I'm thinking it's not.
Whiteboard: [tilt]
You're right, this is a bug. We should go back to the initial behavior.
I'll take a look at this.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attached patch v1 (obsolete) — Splinter Review
The only change worth looking at is in browser/devtools/highlighter/inspector.jsm. I added a currentInstance getter in Tilt to get the visualizer for the current tab.
Attachment #590184 - Flags: feedback?(paul)
Attached patch v2 (obsolete) — Splinter Review
Using the bubbling trick. I left the currentInstance getter in there because it may be useful sometime!
Attachment #590188 - Flags: feedback?(paul)
Blocks: 719783
Comment on attachment 590188 [details] [diff] [review]
v2

This approach sounds good.

Not sure this is needed:
+      e.preventDefault();

Why don't you just use `code = e.keyCode` ?
Attachment #590188 - Flags: feedback?(paul) → feedback+
Attached patch v3 (obsolete) — Splinter Review
Attachment #590184 - Attachment is obsolete: true
Attachment #590184 - Flags: feedback?(paul)
Attachment #590193 - Flags: review?(rcampbell)
Attachment #590193 - Flags: feedback?(paul)
No longer blocks: 719783
Depends on: 719732
Blocks: 719877
Comment on attachment 590193 [details] [diff] [review]
v3

+    canvas.addEventListener("keypress", this.onKeyPress, false);

should this be , true? Do we want capturing?

e.g., Inspector is now using:

     this.highlighter.highlighterContainer.addEventListener("keypress",
       this.onKeypress, true);

(line 367, InspectorUI).

and for completeness, you probably want to use preventDefault() as well as stopPropagation().
Attachment #590193 - Flags: review?(rcampbell)
ok, scratch that bit about needing preventDefault() it's redundant.
(In reply to Rob Campbell [:rc] (robcee) from comment #8)
> ok, scratch that bit about needing preventDefault() it's redundant.

But I wanna!
Attached patch v4010Splinter Review
Attachment #590188 - Attachment is obsolete: true
Attachment #590193 - Attachment is obsolete: true
Attachment #590193 - Flags: feedback?(paul)
Attachment #592273 - Flags: review?(rcampbell)
Attachment #592273 - Flags: review?(rcampbell) → review+
Whiteboard: [tilt] → [tilt][land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/39afbd62c96e
Whiteboard: [tilt][land-in-fx-team] → [tilt][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/39afbd62c96e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [tilt][fixed-in-fx-team] → [tilt]
Target Milestone: --- → Firefox 12
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: