From 83721bd9f71ea3e272d98e5e87d789ab000e0873 Mon Sep 17 00:00:00 2001 From: nowrep Date: Fri, 18 Mar 2011 20:53:02 +0100 Subject: [PATCH] When right clicking on link with javascript code, we won't show context menu for links --- src/webview/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index 67f90d196..aef3190ff 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -384,7 +384,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event) QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos()); - if (!r.linkUrl().isEmpty()) { + if (!r.linkUrl().isEmpty() && r.linkUrl().scheme()!="javascript") { if (page()->selectedText() == r.linkText()) findText(""); menu->addAction(tr("Open link in new window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());