Can't start dragging a draggable element if it is nested in an <a> element
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
People
(Reporter: matma.rex, Unassigned)
Details
Attachments
(1 file)
|
1.45 KB,
text/html
|
Details |
Steps to reproduce:
Create a draggable element that is nested in an <a> element. See attached test case.
Actual results:
Only the parent <a> element can be dragged, not the nested element.
Expected results:
The nested element should be dragged if the drag action starts on it.
According to https://html.spec.whatwg.org/multipage/dnd.html#drag-and-drop-processing-model, the element being dragged is "the first element, going up the ancestor chain, starting at the node that the user tried to drag, that has the IDL attribute draggable set to true". If I understand correctly, this means the nested element in this test case should be dragged.
This test case works as expected on Chromium.
The behavior also works as expected on Firefox when the parent element is a normal <div> tag, or an <a draggable="false">, or a <div draggable="true">. It's only an <a> with the "auto" draggable behavior (or draggable="true") that triggers the issue.
| Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
The test case (the first "inner" thing) works the same way in Safari as in Chrome.
Description
•