mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
When right clicking on link with javascript code, we won't show context
menu for links
This commit is contained in:
parent
e04885ec27
commit
83721bd9f7
|
@ -384,7 +384,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
||||||
|
|
||||||
QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
|
QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
|
||||||
|
|
||||||
if (!r.linkUrl().isEmpty()) {
|
if (!r.linkUrl().isEmpty() && r.linkUrl().scheme()!="javascript") {
|
||||||
if (page()->selectedText() == r.linkText())
|
if (page()->selectedText() == r.linkText())
|
||||||
findText("");
|
findText("");
|
||||||
menu->addAction(tr("Open link in new window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
|
menu->addAction(tr("Open link in new window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user