Closed Bug 1645873 Opened 4 years ago Closed 2 years ago

Drag & dropping conversations/messages to the GMail labels sidebar doesn't work everytime / sometimes only works once (regression?)

Categories

(Web Compatibility :: Site Reports, defect)

defect

Tracking

(Webcompat Priority:?)

VERIFIED WORKSFORME
Webcompat Priority ?

People

(Reporter: nekohayo, Unassigned)

References

()

Details

(Keywords: webcompat:site-wait)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

Log into mail.google.com, click on the hamburger menu on the left (next to the GMail logo) to "fold" the folders/labels sidebar.

Then, grab one mail conversation (with the little grab handle on the left of the checkbox) and drop it to one of the labels to move/reaffect it to a new label/folder.

Then, try to do the same thing with another conversation/mail again.

Actual results:

The 1st time, the sidebar automatically unfolds and the drag & drop operation works.
The 2nd time, the sidebar stays folded, the drag stays "stuck" against it, and it remains "stuck" to the mouse cursor even when you release the left mouse button, and until you click somewhere else.

Expected results:

Drag and drop should work everytime.

Notes:

  • This is Firefox on Linux with both Xorg/X11 and Wayland. I haven't tried on Windows or other platforms.
  • Chromium has no problem doing that drag and drop operation repeatedly on the same system
  • The problem does not occur if the labels sidebar is unfolded, in that case drag & drop with Firefox seems to work every time.

CORRECTION: I spoke too soon. Turns out the problem occurs even if the labels sidebar is unfolded, not just if it's folded.

So in fact this seems like a regression to me (I started noticing this sometime in 2020, so probably somewhere after version 70). I don't have much stuff going on in my Firefox set up, I basically have a couple of "containers" extensions and uBlock origin installed. I don't see what could be causing this issue with drag & drop getting "stuck" to the mouse cursor.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Summary: When the GMail labels sidebar is folded, drag & dropping conversations/messages to the auto-unfolding sidebar only works once (regression?) → Drag & dropping conversations/messages to the GMail labels sidebar doesn't work everytime / sometimes only works once (regression?)

Can you please create a video of the issue?
Thanks.

Flags: needinfo?(nekohayo)

OK I see this is a bit tricky to reproduce, it doesn't happen all the time. Here are some videos (not attaching them here for privacy reasons; and you'll probably need to wget them to play them in a video player such as Totem or VLC or mpv, because Firefox doesn't like them). They were recorded under X11/Xorg; the issues happens on Wayland too, but I can't screencast portions of the screen easily with Wayland.

https://fortintam.com/private/firefox-bug-1645873-broken-gmail-drag-and-drop-attempt1.mp4 : in this video, everything works fine until the 1m40s mark... notice it's only at that time that, during the drag, the GMail sidebar expands vertically to unfold all the folders (from the "More..." section at the bottom), therefore creating a scrollbar widget, and that's when the drag breaks and gets "stuck". Coïncidence? I don't know, because I tried afterwards and revealing the sidebar's scrollbar didn't seem to be enough to trigger the issue.

So this led me to find a new way to trigger the bug much more consistently: https://fortintam.com/private/firefox-bug-1645873-broken-gmail-drag-and-drop-attempt2.mp4 ; it seems, from that 2nd video, that it is much more likely to happen if you are "quick" with your drag and drop movement. If you're too fast, it will get stuck. It might be a race condition of some sort? That video also highlights two kinds of symptoms: either the draggable email (the blue thingy) gets "stuck" to the mouse cursor even if you're over the sidebar, OR that draggable email doesn't even manage to cross into the sidebar and gets "stuck" on the right side.

Flags: needinfo?(nekohayo)

Can you please try to run Firefox on command line as:

MOZ_LOG="nsDragService:5" firefox

and see if the D&D actions are performed during the message D&D and attach the log here? I suspect this is not Firefox / Gtk D&D but some Gmail JS code which is handling that.

Flags: needinfo?(nekohayo)
 MOZ_LOG="nsDragService:5" firefox
 [Parent 91756: Main Thread]: D/nsDragService nsDragService::nsDragService
 Gdk-Message: 10:17:14.421: Unable to load openhand from the cursor theme
 Gdk-Message: 10:17:14.421: Unable to load 5aca4d189052212118709018842178c0 from the cursor theme
 Gdk-Message: 10:17:18.219: Unable to load closedhand from the cursor theme

Those GDK messages happen on startup (I think), nothing happens on the terminal during a "successful" drag and drop operation in GMail... however, once you hit the bug / "stuck" condition, then a ton of stuff suddenly gets printed in the terminal (and at the end, I had to "cancel" the drag, I think by clicking somewhere neutral on the page and/or pressing the Esc key):

[Parent 91756: Main Thread]: D/nsDragService nsDragService::InvokeDragSession
[Parent 91756: Main Thread]: D/nsDragService invisibleSourceDragBegin
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::StartDragSession
[Parent 91756: Main Thread]: D/nsDragService nsDragService::SetCanDrop 1
[Parent 91756: Main Thread]: D/nsDragService nsDragService::ReplyToDragMotion 1
[Parent 91756: Main Thread]: D/nsDragService invisibleSourceDragFailed 5
[Parent 91756: Main Thread]: D/nsDragService SourceEndDragSession result 5
[Parent 91756: Main Thread]: D/nsDragService guess drag end point 254 359
[Parent 91756: Main Thread]: D/nsDragService invisibleSourceDragEnd
[Parent 91756: Main Thread]: D/nsDragService SourceEndDragSession result 0
[Parent 91756: Main Thread]: D/nsDragService nsDragService: dispatch drag leave (0x7f07f14f5c00)
[Parent 91756: Main Thread]: D/nsDragService nsDragService::EndDragSession 1
Flags: needinfo?(nekohayo)

(In reply to Jeff Fortin from comment #6)

 MOZ_LOG="nsDragService:5" firefox
 [Parent 91756: Main Thread]: D/nsDragService nsDragService::nsDragService
 Gdk-Message: 10:17:14.421: Unable to load openhand from the cursor theme
 Gdk-Message: 10:17:14.421: Unable to load 5aca4d189052212118709018842178c0 from the cursor theme
 Gdk-Message: 10:17:18.219: Unable to load closedhand from the cursor theme

Those GDK messages happen on startup (I think), nothing happens on the terminal during a "successful" drag and drop operation in GMail...

That means Firefox D&D GTK code is not used but the D&D is handled by some Gmail JS script. Do you see anything in browser console (Tools -> WebDeveloper -> Browser Console) during the failed D&D? There may be some reports from JS engine.

Flags: needinfo?(nekohayo)

Indeed, in the "Console" tab, this is what happens at the moment where a drag and drop "breaks" in GMail:

Empty string passed to getElementById().            40 m=b:1061:255

Clicking the "m=b:1061:255" part, it opens up a tab that shows the offending code in GMail's javascript (attaching a screenshot). The javascript file's URI seems to be composed of gibberish.

Trying to reproduce the issue in Chromium or a WebKit-based browser like Epiphany (GNOME Web) doesn't trigger that warning in their consoles, and the issue does not happen at all with Chromium.

Flags: needinfo?(nekohayo)

Dao, what's the correct component for such bug?
Thanks.

Component: Widget: Gtk → General
Flags: needinfo?(dao+bmo)
Product: Core → Firefox
Component: General → Desktop
Flags: needinfo?(dao+bmo)
Product: Firefox → Web Compatibility
Version: 77 Branch → unspecified

If its an error in content that isnt obviously a problem with our dom / js then I think web compat is the best place?

so issues on Google properties are difficult to compare in between browsers, because Google usually sends very different version of minified code to each browsers.

I can't fully reproduce on macos, but I think I understand the issue.

Basically the drag and drop is working the issue seems more related to the selection of the item. Once I get close to the handle the 6 dots at the beginning of the line, a disk appears around the checkbox. If I put the mouse in the corner in a way that this is not in the disk, I can select and drop on the label without issues, but if I'm in the disk area, then the checkbox get selected and it's not really possible to drop the item on the label.

In Chrome the visual state of being checked is released as soon as you release the item, while on firefox it stays checked.

Webcompat Priority: --- → ?

Also fwiw, it is not mandatory to select the area in front of the checkbox, any part of the line can be selected and drag and drop on the labels and this is working every time.

contacted google about it.

Bonjour Karl,
Have you heard anything from your Google contact in reply to your outreach? Your theory kinda makes sense, but as I've been re-testing this tonight, I can't confirm it 100% in practice, because of #1 below:

1- even if I grab the mail "by the checkbox" rather than the super-thin "handle" dots, then yes the checkbox grab will often hang... BUT it will also sometimes not hang at all, so I can't deduce that it is 100% of the cause per se. But it does look likely, still.
2- alternatively, if I start the drag from somewhere else outside the checkbox area (including from the sender's name or subject, not just the left-most drag handle) then you are correct that it seems to never fail in that case.

So #2 confirms your theory, but #1 casts some doubt because it doesn't fail in "every" case.

In the case of #1, it really seems to be random, with more likelihood of being triggered if you do the grab-and-move movement quickly, in a diagonal way (unlike in video no2 above, tonight I tested with an email that was sitting somewhere in the middle, mid-height, of the inbox, dragging it diagonally to a folder that sits close to the top of the folders list.

For what it's worth, I also tested with different mouse cursor sizes, including the smallest cursor size, just to be sure that wasn't because of my big fat cursor. No significant impact from the mouse cursor size was observed.

I was told a bug would be opened, but no verbal status on the progress from Google.
I sent them an additional email.

(next time do not hesitate to needinfo me so I would not miss your email)

I could not reproduce the issue on my side. Even if I drag the email to any of the labels fast/slow, it does not get stuck.
I still get "Empty string passed to getElementById()." in the console, every time I drag the mail to a label.

Tested with:
Browser / Version: Firefox Nightly 104.0a1 (2022-06-29)
Operating System: Ubuntu 20.04.2

Jeff can you still reproduce it?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nekohayo)

Since this is not reproducible, let's close as WORKSFORME, but feel free to reopen if it still occurs.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(nekohayo)

Just for the record, as I've been testing this every now and then, couldn't reproduce it anymore, but wanted to be sure: I have tested again today and yeah... they must have changed something on the GMail side of things, or maybe something was fixed in Firefox, because the issue does not seem to happen at all anymore. It is a mystery.

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

Attachment

General

Creator:
Created:
Updated:
Size: