Closed
Bug 704228
Opened 13 years ago
Closed 13 years ago
Keybindings not restored in Highlighter when returning from other tab
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox10-)
RESOLVED
FIXED
Firefox 11
Tracking | Status | |
---|---|---|
firefox10 | - | --- |
People
(Reporter: rcampbell, Assigned: paul)
Details
Attachments
(1 file, 2 obsolete files)
3.96 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
STR:
1. In a webpage, open the highlighter and lock a node by clicking on it.
2. Open a new tab.
3. Switch back to tab from step 1.
Expected Results:
Pressing Enter (key) should restart inspection.
Actual:
Enter does nothing.
Reporter | ||
Updated•13 years ago
|
Whiteboard: [good-first-bugs][mentor=robcee][lang=js]
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #575962 -
Flags: review?(rcampbell)
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #575973 -
Flags: review?(rcampbell)
Assignee | ||
Updated•13 years ago
|
Attachment #575962 -
Attachment is obsolete: true
Attachment #575962 -
Flags: review?(rcampbell)
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 575973 [details] [diff] [review]
patch v1.1 - with comments
I think we should set the state of "locked" on the highlighter depending on whether InspectorUI.inspecting is true or false. That property is set in start and stopInspecting.
That'll do away with the unnecessary additional storage property.
+ // We start inspecting, even if the node is locked, to initiate the
+ // key event listeners.
+ let locked = this.store.getValue(aWinID, "locked");
+ this.startInspecting();
+ if (locked) {
+ this.stopInspecting();
+ }
+
maybe rather than do this, you could call startInspecting() in highlighterReady and if !this.inspecting was set (before the startInspecting() call, obviously), call stopInspecting();
Although, that feels kind of messy.
Maybe move the this.browser.addEventListener("keypress", this, true); out of startInspecting into somewhere earlier in the InspectorUI's startup path?
Test looks like it should catch the problem.
Attachment #575973 -
Flags: review?(rcampbell) → review-
Assignee | ||
Comment 4•13 years ago
|
||
You're right. I have better version coming.
I also realize that we add keypress event listeners on `startInpsecting`, but we don't remove them on `stopInspecting`. Every time we toggle the inspection, we add extra listeners.
I'll just add the listeners in `initializeHighlighter`.
Reporter | ||
Comment 5•13 years ago
|
||
yeah, that'd be best.
Was also thinking about the location of the "lock" setting. You'll probably want to move them into a method in the Highlighter prototype when you're doing your refactoring.
Assignee | ||
Comment 6•13 years ago
|
||
I think this is a better approach
Attachment #576460 -
Flags: review?(rcampbell)
Assignee | ||
Updated•13 years ago
|
Attachment #575973 -
Attachment is obsolete: true
Reporter | ||
Comment 7•13 years ago
|
||
Comment on attachment 576460 [details] [diff] [review]
patch v1.2
yeah, that looks much better. Thanks!
Attachment #576460 -
Flags: review?(rcampbell) → review+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [good-first-bugs][mentor=robcee][lang=js] → [land-in-fx-team]
Reporter | ||
Updated•13 years ago
|
Attachment #576460 -
Attachment is patch: true
Reporter | ||
Comment 8•13 years ago
|
||
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 11
Comment 10•13 years ago
|
||
Not tracking for FF10 since the user effect does not seem great to a majority of our users (and it's unclear how many keybindings are in the highlighter). That being said, if this is still deemed highly desirable and low risk, please nominate for Beta 10 approval.
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•