Closed Bug 1521471 Opened 6 years ago Closed 6 years ago

Unable to start drag'n'drop operation from an element inside a shadow root

Categories

(Core :: DOM: Editor, defect, P3)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
mozilla68
Tracking Status
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- verified

People

(Reporter: artur, Assigned: artur)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce:

  1. Create an element containing a shadow root
  2. Set the element to draggable=true
  3. Add a dragstart listener to the element
  4. Drag from any element inside the shadow root

Test/example: http://jsfiddle.net/L0vf39pb/

Actual results:

The dragstart listener is called properly when dragging from any element outside the shadow root but never triggered when dragging an element inside the shadow root.

Expected results:

Shadow roots should not prevent dragging. Dragging any element inside the shadow root should also start the drag operation.

Related Webkit issue, recently fixed: https://bugs.webkit.org/show_bug.cgi?id=136836
Provided test passes in Chrome stable, Safari Tech Preview. Fails in stable Safari as the linked fixed has not been included yet.

I can reproduce this issue on all versions of Firefox: nightly 66.0a1, beta 65.0b12, release 64.0.2 and different OS's: windows 10, Mac OS X, Ubuntu.

Status: UNCONFIRMED → NEW
Component: Untriaged → Editor
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → Desktop
Version: 63 Branch → Trunk
Priority: -- → P3

Before this change, only elements inside the shadow root tree were scanned for the
draggable=true attribute. We now check the flattened tree instead so an element
inside a shadow root can start a drag for an element containing the shadow root.

Assignee: nobody → artur

Artur, thanks so much for this fix!

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23e432bdaf62 dragndrop: Allow drag'n'drop to start from elements inside a shadow root r=emilio
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Verified - Fixed on latest Nightly 68.0a1 (2019-05-14) (64-bit) on Windows 10, Mac OS 10.14 and Ubuntu 18.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: