summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/webview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 48c35615..0cc09574 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -764,7 +764,13 @@ void WebView::openLinkInNewTab()
KAction *a = qobject_cast<KAction*>(sender());
KUrl url(a->data().toUrl());
- emit loadUrl(url, Rekonq::NewTab);
+ WebTab *tab = qobject_cast<WebTab *>(parent());
+ WebWindow *webwin = tab->webWindow();
+
+ if (webwin)
+ emit loadUrl(url, Rekonq::NewTab);
+ else
+ emit loadUrl(url, Rekonq::NewFocusedTab);
}
void WebView::openLinkInPrivateWindow()