Closed
Bug 879578
Opened 11 years ago
Closed 11 years ago
Maintain selected node and expanded html tree on reload
Categories
(DevTools :: Inspector, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: fitzgen, Assigned: pbro)
References
Details
Attachments
(1 file, 2 obsolete files)
11.46 KB,
patch
|
Details | Diff | Splinter Review |
STR: * Open https://www.mozilla.org/en-US/ * Cmd+Opt+I and click on "Mozilla" in the title * The html tree has expanded and the img element is selected * Refresh Expected result: * The html tree has automatically re-expanded, and the img element is selected again Actual result: * Nothing is selected and the html tree is collapsed
Assignee | ||
Comment 1•11 years ago
|
||
Working on a patch for this. I should be ready soon. What happens now is: When the tab is reloaded and the inspector initializes, an attempt is made to select <body> and if that fails then documentElement is selected by default. What I propose is: - whenever a node is selected in the inspector, record its unique CSS selector and the current page's URL (this can be done at inspector-panel.js level as this module is not reloaded). - when the tab is reloaded, we check 2 things: has a unique CSS selector been recorded and does its URL match the reloaded page's URL. - if these 2 conditions are met, then an attempt should be made to select the unique CSS selector, if that fails then attempt to select <body>, and finally if that fails too, select documentElement. This is by the way what other devtools seem to be doing.
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #800134 -
Flags: review?(paul)
Assignee | ||
Updated•11 years ago
|
Attachment #800134 -
Flags: review?(paul)
Assignee | ||
Comment 3•11 years ago
|
||
Try : https://tbpl.mozilla.org/?tree=Try&rev=222058ebf555
Attachment #800147 -
Flags: review?(paul)
Assignee | ||
Comment 4•11 years ago
|
||
TRY is green
Comment 5•11 years ago
|
||
Comment on attachment 800147 [details] [diff] [review] 879578-reselect-node-after-reload.patch > CssLogic.findCssSelector(this.selection.node); Are we sure this.selection.node is a node with a selector? What if it's a comment or a doctype? Don't you want to test first if it's an element: > this.selection.isElementNode()
Attachment #800147 -
Flags: review?(paul) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Good point. Thanks for the review. - I have changed the patch to check if the node is an element - Try build is green - Review is r+ Attaching the patch now and adding [land-in-fx-team] whiteboard.
Whiteboard: [land-in-fx-team]
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #800134 -
Attachment is obsolete: true
Attachment #800147 -
Attachment is obsolete: true
Comment 8•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Fx-Team&rev=bf671d77bdad https://hg.mozilla.org/integration/fx-team/rev/bf671d77bdad
Assignee: nobody → pbrosset
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bf671d77bdad
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•