Closed Bug 1733523 Opened 2 months ago Closed 2 months ago

Removing remote iframe containing a node selected in the inspector doesn't properly reset the selection

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

(Whiteboard: dt-perf-stability-mvp, dt-fission)

Attachments

(1 file)

Steps to reproduce

  1. With Fission selected, open a tab on data:text/html,<meta charset=utf8><iframe src="https://example.com"></iframe><button onclick="document.querySelector('iframe').remove()">Remove iframe</button>
  2. Right click on the "Example domain" text and select "Inspect"
  3. The inspector opens and the <h1> node is selected
  4. In the content page, hit the Remove iframe button

Expected results

The iframe gets removed, and in the inspector, the top level body node is selected

Actual results

The iframe gets removed, but no node gets selected

In Selection, on top of listening for mutations events, we also watch for
walker front destruction, so we can emit the detached-front event the inspector
listens to in order to move the selection to an exising node.
This fixes the browser_inspector_delete-selected-node-* tests when EFT is enabled.

Depends on D127223

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a26075e0ca22
[devtools] Handle moving node selection when selected node's target gets destroyed. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.