Drag and Drop Event Pipeline completely destroyable in Firefox69
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
People
(Reporter: fischer.andreas.atf, Unassigned)
Details
Attachments
(1 file)
1.30 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Steps to reproduce:
If a drag on a simple draggable element is started and the mouse button is released right when the dragstart event is dispatched, the D&D mechanic of this very browser tab is broken.
Here is a minimum example, reproducable on all kinds of machines here in my office and verified by different colleagues.
Just follow the instructions. You may need a view tries. ;)
<html>
<body>
<h3>With Firefox <= 69:</h3>
<ol>
<li>Drag the red box while not moving the cursor at all</li>
<li>Now concentrate and move the cursor pixel by pixel until DRAGSTART is printed</li>
<li>In exact this moment release the mouse button</li>
</ol>
<h3>Congratulations! You broke the D&D pipeline of Firefox!</h3>
<p>Only dragstart events will be dispatched from now on. And yes in FF69, you can reload and drag again as much as you want.<br />
Once you perform a drag & drop outside of this tab, it will work again.</p>
<br />
<hr />
<div style="background-color: red; display: inline-block; height: 100px; width: 200px;" draggable="true" onDragstart="onDragstart(event)" onDragend="onDragend(event)"></div>
<hr />
<button onClick="clearOutput()">Clear output</button>
<div id="output" style="white-space: pre;"></div>
</body>
<script>
function onDragstart( e ) {
if( e.dataTransfer ) {
e.dataTransfer.effectAllowed = 'move';
e.dataTransfer.setData('text', "");
}
document.getElementById('output').innerHTML += "\nDRAGSTART";
}
function onDragend( e ) {
document.getElementById('output').innerHTML += "\nDRAGEND";
}
function clearOutput() {
document.getElementById('output').innerHTML = "";
}
</script>
</html>
In my Application (for some reason i don't yet know) the phenomenon occurs far more often and way easier. It could depend on how fast the dragstart event handler is (not sure).
The complaint tickets are stacking up since last week. I guess due to the 69 release. Before they could just drag again and everything was back to normal. Now it's quite a mess.
This bug is already known since FF58! But in Versions <= 69 dragging anew would reset the D&D state and everything would work again. But in 69, it stays broken!!
Even reloading the page wont fix the D&D again!!!!
Only known workaround for the user
Once another D&D is performed in FF but outside that very tab, the dragend event is dispatched again.
This bug was reported in this ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1421333 but was unconfirmed since two years. I also commented on that topic but i am afraight that this will not be red anymore.
I have not yet found any workaround for this. I tried to mock the dragend event, no effect.
This is critical and i hope this will be solved in the near future.
Thanks in advance.
Actual results:
Once the broken D&D state is reached, only dragstart events are dispatched.
Expected results:
The usual event pipeline should have been dispatched.
dragstart
(optional dragmove)
dragend
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
We think this will be fixed by 1476195. Please reopen a build with that fix does not fix this issue.
Reporter | ||
Comment 3•5 years ago
|
||
@Neil Deakin
The bug is not yet fixed in 71.0a1 (2019-09-15) (64-Bit)
Updated•5 years ago
|
Comment 4•5 years ago
|
||
The priority flag is not set for this bug.
:enndeakin, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•5 years ago
|
||
This is however I'm pretty sure bug 1581285.
Description
•