Open Bug 1595883 Opened 5 years ago Updated 2 years ago

Immediate drag-and-drop across the sidebar and Firefox UI produces a zombie drag session and breaks subsequent drag-and-drops on Windows

Categories

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

70 Branch
Desktop
Windows
defect

Tracking

()

People

(Reporter: yuki, Unassigned)

Details

Attachments

(1 file)

This is very similar to the bug 1476195, but this happens on Windows.

Abstract

When a drag action is started in a sidebar (provided by an extension) and the cursor is moved onto Firefox's UI before all dragstart event handlers are finished, Firefox produces a zombie drag session. Such a zombie drag session produces odd behaviors:

  • It breaks subsequent drag-and-drop operations in the sidebar.
  • When something in the content area is dragged and dropped onto the content area (not the sidebar!), then the zombie drag session is finished and a dragend event is dispatched in the sidebar.

This problem happens when the system is slow and Firefox takes time to process event handlers for a dragstart event.

Original report for Tree Style Tab addon is:
https://github.com/piroor/treestyletab/issues/2411

Steps to reproduce

  1. Go to about:config and ensure that extensions.webextensions.remote is true.
    (This problem requires enabled e10s for addons.)
  2. Go to about:debugging.
  3. Load the attached test case as a temporary addon. Then a sidebar panel is loaded.
  4. Start dragging on the box 2. Drag me, and move... in the sidebar.
  5. Move your mouse onto Firefox's UI area (toolbar, tab bar, sidebar header, and so on) immediately within 3 sec. And stay there with no more mouse move.
  6. After the text in the box is changed to 3. Now you are OK to release the mouse button..., release the mouse button.
  7. Try to drag boxes 1. Drag me... or 4. Try to..., and look at the console area below boxes.
  8. Look at the content area (it should be about:debugging if you don't switch tabs after the step 2.) And drag a link from the content area and drop it into the content area immediately. Then look at the console area below boxes.

Actual result

  • At the step 6: nothing is reported.
  • At the step 7: only DragStart is reported but DragOver and DragEnd are never reported.
  • At the step 8: a DragEnd is reported. And after that drag-and-drop of both boxes 1. Drag me... and 4. Try to... reports all DragStart, DragOver and DragEnd events.

Expected result

  • At the step 6: a DragEnd is reported.
  • At the step 7: all DragStart, DragOver and DragEnd are reported for each drag-and-drop.
  • At the step 8: nothing is reported.

Environment

  • Windows 10 64bit 1903
  • Firefox 70.0.1 64bit

On Nightly 72.0a1 (build ID: 20191112094307) I got a different result. The steps to reproduce in the initial comment work as I expected. But I saw a different unexpected result with following steps:

  1. Go to about:config and ensure that extensions.webextensions.remote is true.
    (This problem requires enabled e10s for addons.)
  2. Go to about:debugging.
  3. Load the attached test case as a temporary addon. Then a sidebar panel is loaded.
  4. Start dragging on the box 2. Drag me, and move... in the sidebar.
  5. Move your mouse outside the sidebar and release the button immediately before the text in the box is changed (within 3 sec).
  6. Click anywhere in the content area. Please pay attention that you don't move the cursor across the sidebar area.

Actual result

  • At the step 5: only DragStart is reported but DragOver and DragEnd are never reported.
  • At the step 6: a DragEnd is reported.

Expected result

  • At the step 5: a DragEnd is reported after a DragStart.
  • At the step 6: nothing is reported.

I can reproduce this on MacOS Mojave 10.14.6 (18G103) and Firefox 70.0.0 and 70.0.1.

I want to drag a li element from the tab to that same tab, but after dragstart event I move the mouse a little bit then drop.
That does not trigger the dragend event and makes any other attempts to trigger the dragstart event only.

What unfreezes this situation is another drag and drop from another tab. Weirdly enough, a reload of the tab does not solve the issue.

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)
Flags: needinfo?(enndeakin)
Priority: -- → P3
Severity: normal → S3

I believe the issue I'm experiencing with Sideberry may be related. I personally only started noticing it once I switched Firefox to use Wayland instead of XWayland.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: