Closed Bug 1609345 Opened 2 years ago Closed 2 years ago

inspect(domElement) does not update the selected node in the inspector when evaluated from the split console

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

Steps to reproduce

  1. Go to data:text/html,<meta charset=utf8><h1>Hello</h1>
  2. Open the inspector
  3. Make sure the <body> node is selected
  4. Open the split console with <kbd>Esc</kbd>
  5. In the split console, evaluate inspect($("h1"))

Expected results

The <h1> node gets selected in the inspector

Actual results

The inspector isn't updated


In the inspect handler, we were only selecting
the element in the inspector if the current panel
wasn't the inspector.
But if the current panel is the inspector, and the
split console is open, we still want the element
to be selected in the inspector.
This patch removes the extra check on the current
panel, and adds a test so we don't regress.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d889627c1bf5
Fix inspect(el) in split console. r=jlast.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
Duplicate of this bug: 1609366
Duplicate of this bug: 1611248
Regressions: 1611682
You need to log in before you can comment on or make changes to this bug.