Bug 1888623 - Drag of unknown type aborted on motion above WebView under X11
Summary: Drag of unknown type aborted on motion above WebView under X11
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: webkit2gtk3
Version: 32
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Michael Catanzaro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1895636 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-15 11:41 UTC by Nuno Dias
Modified: 2020-11-09 08:26 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-11-02 22:51:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
desktop recorder (2.19 MB, application/x-matroska)
2020-10-22 09:14 UTC, Nuno Dias
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME evolution issues 1189 0 None None None 2020-10-29 13:58:09 UTC
WebKit Project 218462 0 None None None 2020-11-02 22:51:07 UTC

Description Nuno Dias 2020-10-15 11:41:51 UTC
Description of problem:
Can't move a message to a different folder using the mouse, I can't drag and drop a message to a different Folder, the icon if the message is dragged but when the mouse is in the top of folder, the folder is not selected.

Version-Release number of selected component (if applicable):
evolution-3.36.5-1.fc32.x86_64


How reproducible:
every time.

Steps to Reproduce:
1. Move a message using mouse (drag and drop) to a different folder.
2.
3.

Actual results:
Can't move the message

Expected results:
The message is moved.

Additional info:

Comment 1 Milan Crha 2020-10-15 15:29:03 UTC
Thanks for a bug report. Fedora 32 didn't receive any update of the Evolution package for some time, thus, if this is anything new, I'd guess an update of some package evolution depends on caused this (maybe gtk3?). A quick check: what is the folder type you try to drop the message to, please? Evolution doesn't accept drop to search/virtual folders.

Also, do you run a Wayland session or an X11 session? I recall there had been some issues with drag&drop under Wayland, which may or may not be fixed already (I do not follow Wayland development at all).

Comment 2 Nuno Dias 2020-10-16 10:13:16 UTC
This action was working some time ago, let's say one or two weeks, I'm moving from a Folder in IMAP to another folder in IMAP, is not a search/virtual folder.
I'm running X11 session

Comment 3 Milan Crha 2020-10-19 06:56:32 UTC
Evolution 3.36.5 had been released on 2020-08-07, no idea when you updated to it, but I guess sooner than  two weeks ago. That makes me believe the problem is lower in the stack, might be in the gtk3, as I mentioned above. Could you try to downgrade it and then start Evolution and see whether you can still reproduce the issue, please? Even, I tried it here with an up-to-date Fedora 32, which had installed:
   glib2-2.64.6-1.fc32.x86_64
   gtk3-3.24.23-1.fc32.x86_64
   evolution-3.36.5-1.fc32.x86_64
and I can drag & drop messages from one folder to another, pressing also Ctrl to copy it, rather than to delete it.

Comment 4 Nuno Dias 2020-10-19 18:02:13 UTC
Downgrading to 
gtk3-3.24.18-1.fc32.x86_64
glib2-2.64.1-1.fc32.x86_64
evolution-3.36.1-1.fc32.x86_64

don't solve the problem.
Strange thing, If i try to move to a local folder work everytime, In the same action if I move the mouse to an IMAP folder works also.
But if I try to move to an IMAP folder as the first action doesn't work

Comment 5 Milan Crha 2020-10-20 07:21:23 UTC
It looks like it failed to identify proper drop target, but why it did so I do not know.

Could you update back to the latest versions and then download and install these [1] evolution test packages, which add some debug prints into the terminal when dragging messages from the message list over the folder tree, please? It's quite chatty, because it prints several lines every time you drag the messages above the folder tree, pixel by pixel. It should print why it doesn't want to allow drop of the message on the respective folder.

With respect of the install of the packages from [1], first check what evolution packages you've installed, with:

   $ rpm -qa | grep evolution

You might have installed at least 'evolution' and 'evolution-langpacks'. Download those matching from the [1] and then go to the directory you saved the packages to in a terminal and run this command:

   $ sudo dnf update ./evolution*.rpm

Then, if succeeded, run evolution from the terminal and reproduce the issue. My last three lines look like this:

   folder_tree_drop_target: checking in drop_atoms; targets (2): 'x-uid-list' 'text/uri-list'
   tree_drag_motion: have UIDLIST or FOLDER match on target 'x-uid-list'
   tree_drag_motion: finish on target 'x-uid-list' with suggested action:COPY (2) chosen:MOVE (4) actions:COPY MOVE (0x6)


[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=53816235

Comment 6 Nuno Dias 2020-10-20 17:11:05 UTC
 I get this

   folder_tree_drop_target: drags a row...
   tree_drag_motion: finish on target 'NONE' with suggested action:COPY (2) chosen:Zero (0) actions:COPY MOVE (0x6)

Comment 7 Milan Crha 2020-10-21 11:54:31 UTC
Thanks for the update. It thinks you begun drag on the folder tree, not in the message list, effectively moving the selected folder (or account) in the folder tree. Did you do anything of it before moving the message from the message list, please?

What is your desktop environment, please? I'm not able to reproduce this under GNOME, neither under MATE.

I made another test build [2]. It'll log also about the drag begin/end on the folder tree widget. Do have installed gdb and debuginfo packages for glib2 and gtk3, in addition to the debuginfo for evolution, all of the same version as the binary packages are (thus the debuginfo can be used by gdb). When the 'tree_drag_begin' or the 'tree_drag_end' are called (they can be seen in the log on the console), the application freezes for a bit, because it calls gdb to print a backtrace, to see where exactly the call was done. Every 'tree_drag_begin' should have its counter part, 'tree_drag_end', called. Please check the output for any private information, like passwords, email address, server addresses,... I usually search for "pass" at least (quotes for clarity only), even I do not expect to see any such in the backtrace.

[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=53902692

Comment 8 Nuno Dias 2020-10-22 09:14:07 UTC
Created attachment 1723487 [details]
desktop recorder

Comment 9 Nuno Dias 2020-10-22 09:18:17 UTC
I installed everything but I have nothing in the terminal when the problem occurs, I have things in the terminal when the drag and drop action is successful.
I attach a video of the actions, It seems If only fails when I drag to a IMAP account, and there are nothing in the way, if a terminal for example is in the way the action is successful!!! 

I'm using Gnome-Shell as my desktop

Comment 10 Milan Crha 2020-10-22 09:39:09 UTC
Thanks for the update and the video. I can finally reproduce it, when dragging through the preview panel, not directly to the folder tree.

When I downgrade webkit2gtk3 to webkit2gtk3-2.28.0-8.fc32.x86_64, then things work as expected. When I update it to webkit2gtk3-2.30.1-1.fc32.x86_64, then the drag fails when the mouse pointer is moved above the preview panel, which is an extended WebKitWebView.

I can reproduce this with GNOME on Xorg and MATE, but not with GNOME Wayland, using the above webkit2gtk3. I'm moving this to the WebKitGTK folks.

Comment 11 Michael Catanzaro 2020-10-22 14:41:06 UTC
It's probably going to be low priority since the bug doesn't occur under Wayland, but feel free to report this upstream on WebKit Bugzilla, WebKitGTK component, and post a link here to the upstream report.

Comment 12 Michael Catanzaro 2020-10-28 22:33:03 UTC
I investigated this a bit today and found this regressed in r261570 [1]. TODO: continue investigation

[1] https://trac.webkit.org/changeset/261570/webkit

Comment 13 Milan Crha 2020-10-29 13:58:26 UTC
Downstream bug report about the same:
https://gitlab.gnome.org/GNOME/evolution/-/issues/1189

Comment 14 Michael Catanzaro 2020-11-02 21:58:06 UTC
For some reason, under X11 we receive only two drag-motion events from GTK, both immediately after the drag begins. Then no more events until drag leave and drag drop. Whereas under Wayland, we receive a huge number of drag-motion events, once every time the cursor moves from one pixel to the next, as expected.

Prior to this regression, we receive *no* drag-motion events, which is extremely confusing (WTF?). In particular, neither webkitWebViewBaseDragMotion nor DragAndDropHandler::dragMotion is ever called. I wondered if some other drag-motion handler was handling it first, but no drag-motion callback in evolution itself is called either. Conclusion: ????????

Comment 15 Michael Catanzaro 2020-11-02 22:51:25 UTC
I spent two afternoons on this, and I'm still stumped. Upstream: https://bugs.webkit.org/show_bug.cgi?id=218462

Comment 16 Milan Crha 2020-11-02 23:07:20 UTC
Thanks. Moving it upstream is fine by me.

Comment 17 Michael Catanzaro 2020-11-06 17:05:40 UTC
Milan fixed this for 2.30.3. Thank Milan!

Comment 18 Milan Crha 2020-11-09 08:26:42 UTC
*** Bug 1895636 has been marked as a duplicate of this bug. ***


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