summaryrefslogtreecommitdiffstats
path: root/tests/quicktestbrowser
diff options
context:
space:
mode:
Diffstat (limited to 'tests/quicktestbrowser')
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 45fad8d9c..e173080dd 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -128,6 +128,7 @@ ApplicationWindow {
shortcut: "Ctrl+T"
onTriggered: {
tabs.createEmptyTab()
+ tabs.currentIndex = tabs.count - 1
addressBar.forceActiveFocus();
addressBar.selectAll();
}
@@ -299,7 +300,7 @@ ApplicationWindow {
function createEmptyTab() {
var tab = addTab("", tabComponent)
// We must do this first to make sure that tab.active gets set so that tab.item gets instantiated immediately.
- tabs.currentIndex = tabs.count - 1
+ tab.active = true
tab.title = Qt.binding(function() { return tab.item.title })
return tab
}
@@ -375,6 +376,10 @@ ApplicationWindow {
print("Warning: Blocked a popup window.")
else if (request.destination == WebEngineView.NewViewInTab) {
var tab = tabs.createEmptyTab()
+ tabs.currentIndex = tabs.count - 1
+ request.openIn(tab.item.webView)
+ } else if (request.destination == WebEngineView.NewViewInBackgroundTab) {
+ var tab = tabs.createEmptyTab()
request.openIn(tab.item.webView)
} else if (request.destination == WebEngineView.NewViewInDialog) {
var dialog = applicationRoot.createDialog()