[webkit-gtk] how to disable drag in webkit ?

arno arno at renevier.net
Wed Jul 13 10:09:18 PDT 2011

Le lundi 11 juillet 2011, à 11:29:18 +0200, Martin a écrit : 
> Le mardi 28 juin 2011, à 08:45:46 -0700, Martin a écrit : 
> > On Tue, Jun 28, 2011 at 8:16 AM, arno <arno at renevier.net> wrote:
> > > I'd like to disable drag and drop in webkit, but failed to see how I could
> > > accomplish that. Is it possible ?

Here is the state of my disable-the-drag quest:
Currently, I've worked around the problem by executing following script inside 
html document:

document.addEventListener("dragstart", function(evt) { evt.preventDefault(); });

I'm still looking for a cleaner way to do (without messing up with the browsed 

I've discovered that gtk defines a property gtk-dnd-drag-threshold which is
not managed by WebKitWebView. If it becomes managed in WebKit/GTK+, I can 
possibly set it to some big value.

So, I've opened bug #64459[1] about it.

I currently don't known how to fix it, but if you think 
gtk-dnd-drag-threshold would be an interesting feature to have in WebView, I'd 
be glad to get some guidance for that bug.



More information about the webkit-gtk mailing list