[Webkit-unassigned] [Bug 218163] New: [GTK] drag-drop not received anymore
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 25 13:13:34 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=218163
Bug ID: 218163
Summary: [GTK] drag-drop not received anymore
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Keywords: Gtk
Severity: Normal
Priority: P3
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: amarok at enconn.fr
CC: bugs-noreply at webkitgtk.org
Hi,
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(
"enable-javascript", TRUE,
"enable-developer-extras", priv->chatview_debug,
"enable-java", FALSE,
"enable-plugins", FALSE,
"enable-site-specific-quirks", FALSE,
"enable-smooth-scrolling", TRUE,
NULL
);
+ be able to connect "drag-drop"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201025/9ad2165a/attachment-0001.htm>
More information about the webkit-unassigned
mailing list