[webkit-gtk] Custom paste handler for editable WebView

Jim Nelson jim at yorba.org
Thu Aug 28 18:41:56 PDT 2014


The problem Robert wrote about back in July is a big issue for Geary -- 
we've had a number of complaints from our users about this, as it 
affects copy-and-paste in our composer.  Does anyone have any 
suggestions or pointers?  We'd really like to nail this down for our 
upcoming release.

The original Geary bug reporting this is at 


-- Jim

On Sat, Jul 19, 2014 at 2:46 PM, Robert Schroll <rschroll at gmail.com> 
> Hi all,
> Without any input from me, an editable WebView will paste text into 
> itself when I press Ctrl-V.  I don't know if this is handled entirely 
> within the WebView, or if the Gtk.Window contains a Ctrl-V 
> accelerator that sends a paste signal to the WebView.  Regardless, 
> I'd like to provide a custom handler for this paste event, rather 
> than relying on the default one.  Is this possible?
> It is for other Gtk widgets, I know.  For example, if I add this 
> handler to a Gtk.Entry:
> 	entry.connect('paste-clipboard', lambda *args:
> 		entry.stop_emission('paste-clipboard'))
> the paste doesn't happen.  (I could query the clipboard and insert 
> some text into the Entry myself, of course.)  But when I do that to a 
> WebView, it has no effect.  The documentation suggests that there is 
> a paste-clipboard signal for the WebView, and I can trigger it 
> manually.  How can I intercept it?
> Thanks,
> Robert
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140828/b4fed26c/attachment.html>

More information about the webkit-gtk mailing list