Open Bug 1691021 Opened 5 years ago Updated 1 year ago

Dragging elements outside of remote iframes silently fails with Fission

Categories

(DevTools :: Inspector, defect, P3)

Firefox 85
defect

Tracking

(Fission Milestone:Future)

UNCONFIRMED
Fission Milestone Future

People

(Reporter: jdescottes, Unassigned)

References

Details

(Whiteboard: dt-fission-future)

STRs:

ER: the node should move
AR: nothing happens

Note: I am filing this as UNCONFIRMED, because I assumed that we didn't allow drag and drop of nodes across frames, remote or not. I am not sure we should allow it, or simply indicate that this is not a valid drop target.

The code responsible for the drag and drop is

      const { nextSibling, parent } = this.markup.dropTargetNodes;
      const { walkerFront } = parent;
      await walkerFront.insertBefore(this.node, parent, nextSibling);

https://searchfox.org/mozilla-central/rev/40205f1b55f1ba8a26fcbd362c20d843e8718a87/devtools/client/inspector/markup/views/markup-container.js#612-615

The walkerFront in this case will correspond to the drop target. If we had to support this cross-frame move, I guess we would have to:

  • first "copy" the node from the frame target
  • then remove the original node in the frame target
  • insert the "copy" in the parent target

Could it become a security issue if remote is allowed?

(In reply to Nabil Tharwat from comment #1)

Could it become a security issue if remote is allowed?

I don't think so, but it's a good question. We wouldn't move the real DOM nodes in this scenario. We would make a "lookalike" copy the DOM node (same type & attributes, ... and recursively on all children) and would move that to the other frame. Users could do the same from existing devtools features, albeit with more steps.

To be frank I think the best here will be to simply disable dropping nodes on remote frames, and show it clearly to the user.

Whiteboard: dt-fission-m3-triage → dt-fission-future

Setting P3, S3 based on triage discussions yesterday. This is an edge case and is borderline an enhancement. The fact that nothing happens is fine, we should probably just improve the UX here and add some user feedback.

Severity: -- → S3
Priority: -- → P3

dt-fission-future bugs don't need to block Fission MVP, so I'm moving them to Fission Future.

Fission Milestone: --- → Future
You need to log in before you can comment on or make changes to this bug.