I currently develop an application with gtkwebkit. 2 years ago we add support for drag & dropping files into the webview, by connecting the webview with:
g_signal_connect(priv->webview_chat, "drag-data-received", G_CALLBACK(webview_chat_on_drag_data_received), view);
g_signal_connect(priv->webview_chat, "drag-drop", G_CALLBACK(webview_chat_on_drag_data), view);
On recent versions, this code is not working anymore for 2 reasons:
1. The drag&drop looks handled by the webview, and instead of launching drag-drop, the webview is loading the file, triggering "decide-policy" with WEBKIT_POLICY_DECISION_TYPE_RESPONSE
2. So "drag-drop" is not emitted, even if I do a webkit_policy_decision_ignore(decision); for WEBKIT_POLICY_DECISION_TYPE_RESPONSE, and the decide-policy is only triggered once.
So, 2 possibillites:
+ Add a setting in WebkitSettings to avoid this behavior. I don't know when it was introduced, but 2 years ago it was not like this (http://www.manpagez.com/html/webkitgtk/webkitgtk-2.4.10/WebKitWebSettings.php)
This is what I use:
WebKitSettings* webkit_settings = webkit_settings_new_with_settings(
+ be able to connect "drag-drop"
In fact it's definitely a very new bug.
I don't have the bug on Ubuntu 20.04 but present on Ubuntu 20.10, and same for Fedora, it's present on my fedora updated the last week-end, but not the one updated 2 months ago
If you can translate versions of Ubuntu/Fedora to versions of WebKitGTK that would be helpful for WebKitGTK developers to understand easier when this new behavior was introduced
I understand Ubuntu-20.04 ships WebKitGTK 2.28.4 and Ubuntu-20.10 WebKitGTK 2.30.1
So the new behavior has started to happen between 2.28.4 and 2.30.1
is that right?
(In reply to Carlos Alberto Lopez Perez from comment #2)
> I understand Ubuntu-20.04 ships WebKitGTK 2.28.4 and Ubuntu-20.10 WebKitGTK
> So the new behavior has started to happen between 2.28.4 and 2.30.1
> is that right?
That seems to be the case indeed, and I observe the same issue on 2.30.1.
*** This bug has been marked as a duplicate of bug 218562 ***