6

I'm creating a Gtk+ app with Python that contains a WebKit2 webview. Anytime an outgoing link in GMail or Google Inbox is clicked a popup is spawned by javascript saying:

"Grrr! A popup blocker may be preventing the application from opening the page. If you have a popup blocker, try disabling it to open the window."

I've enabled the "javascript-can-open-windows-automatically" setting for the webview but it still doesn't work.

If I right-click on any of the outgoing links, and select "open link" or "open in new window", the links will open.

I've also created a handler for navigation requests using "decide-policy" signal and "create" signal, in the hopes of retrieving the uri, however in request object the uri is blank.

This seems to be a problem with webview and gmail/inbox in general as discussed here. The previous question hasn't been solved, therefore I'm asking again but in the context of Python.

Robert.Brnnn
  • 106
  • 4
  • 1
    This has nothing to do with python. It's a fault on either webkit or google end. I'm also looking for a solution. – Larry Oct 19 '18 at 19:14
  • Same here! To be explicit, I've tried the following (`self.wview = WebKit2.WebView(); settings = WebKit2.Settings(); settings.set_property('javascript-can-open-windows-automatically', True); self.wview.set_settings(settings)`)… and it still silently ignores popups – Dan Lenski Apr 22 '21 at 19:54

0 Answers0