Do not follow links in the preview

ui^2
Thomas Lavend'Homme 2020-01-21 12:02:02 +01:00
parent 0d1da19ce8
commit 01d124aea5
No known key found for this signature in database
GPG Key ID: CCA8234E45728B5C
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ if (canScroll && isRendered) {{
if decision_type == WebKit2.PolicyDecisionType.NAVIGATION_ACTION and \
decision.get_navigation_action().is_user_gesture():
webbrowser.open(decision.get_request().get_uri())
decision.ignore() # Do not follow the link in the WebView
return True
return False