Closed Bug 1580688 Opened 5 years ago Closed 5 years ago

Drag and Drop Event Pipeline completely destroyable in Firefox69

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

69 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1581285

People

(Reporter: fischer.andreas.atf, Unassigned)

Details

Attachments

(1 file)

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 &lt;= 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

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Drag and Drop
Product: Firefox → Core

We think this will be fixed by 1476195. Please reopen a build with that fix does not fix this issue.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

@Neil Deakin
The bug is not yet fixed in 71.0a1 (2019-09-15) (64-Bit)

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

The priority flag is not set for this bug.
:enndeakin, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(enndeakin)

This is however I'm pretty sure bug 1581285.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Flags: needinfo?(enndeakin)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: