mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 933989 - New tab button in tab bar always sets focus to the url bar, triggering soft keyboard r=mbrubeck
* * * Bug 933989 - Test --HG-- extra : rebase_source : 840d85ee3bcdec9ec4ac76dce1ae72ce7ef13012
This commit is contained in:
parent
b04c4c4053
commit
9d04c8e972
@ -965,6 +965,7 @@ var BrowserUI = {
|
|||||||
case "cmd_quit":
|
case "cmd_quit":
|
||||||
case "cmd_close":
|
case "cmd_close":
|
||||||
case "cmd_newTab":
|
case "cmd_newTab":
|
||||||
|
case "cmd_newTabKey":
|
||||||
case "cmd_closeTab":
|
case "cmd_closeTab":
|
||||||
case "cmd_undoCloseTab":
|
case "cmd_undoCloseTab":
|
||||||
case "cmd_actions":
|
case "cmd_actions":
|
||||||
@ -1056,6 +1057,9 @@ var BrowserUI = {
|
|||||||
this._closeOrQuit();
|
this._closeOrQuit();
|
||||||
break;
|
break;
|
||||||
case "cmd_newTab":
|
case "cmd_newTab":
|
||||||
|
this.addAndShowTab();
|
||||||
|
break;
|
||||||
|
case "cmd_newTabKey":
|
||||||
this.addAndShowTab();
|
this.addAndShowTab();
|
||||||
// Make sure navbar is displayed before setting focus on url bar. Bug 907244
|
// Make sure navbar is displayed before setting focus on url bar. Bug 907244
|
||||||
ContextUI.displayNavbar();
|
ContextUI.displayNavbar();
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
<!-- tabs -->
|
<!-- tabs -->
|
||||||
<command id="cmd_newTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
<command id="cmd_newTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||||
|
<command id="cmd_newTabKey" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||||
<command id="cmd_closeTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
<command id="cmd_closeTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||||
<command id="cmd_undoCloseTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
<command id="cmd_undoCloseTab" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||||
#ifdef MOZ_SERVICES_SYNC
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
@ -152,8 +153,8 @@ Desktop browser's sync prefs.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- manage tabs -->
|
<!-- manage tabs -->
|
||||||
<key id="key_newTab" key="&newTab.key;" modifiers="accel" command="cmd_newTab"/>
|
<key id="key_newTab" key="&newTab.key;" modifiers="accel" command="cmd_newTabKey"/>
|
||||||
<key id="key_newTab2" key="&newTab2.key;" modifiers="accel" command="cmd_newTab"/>
|
<key id="key_newTab2" key="&newTab2.key;" modifiers="accel" command="cmd_newTabKey"/>
|
||||||
<key id="key_closeTab" key="&closeTab.key;" modifiers="accel" command="cmd_closeTab"/>
|
<key id="key_closeTab" key="&closeTab.key;" modifiers="accel" command="cmd_closeTab"/>
|
||||||
<key id="key_closeTab2" keycode="VK_F4" modifiers="accel" command="cmd_closeTab"/>
|
<key id="key_closeTab2" keycode="VK_F4" modifiers="accel" command="cmd_closeTab"/>
|
||||||
<key id="key_undoCloseTab" key="&newTab.key;" modifiers="accel,shift" command="cmd_undoCloseTab"/>
|
<key id="key_undoCloseTab" key="&newTab.key;" modifiers="accel,shift" command="cmd_undoCloseTab"/>
|
||||||
|
@ -209,7 +209,7 @@ gTests.push({
|
|||||||
// addTab will dismiss navbar, but lets check anyway.
|
// addTab will dismiss navbar, but lets check anyway.
|
||||||
ok(!ContextUI.navbarVisible, "navbar dismissed");
|
ok(!ContextUI.navbarVisible, "navbar dismissed");
|
||||||
|
|
||||||
BrowserUI.doCommand("cmd_newTab");
|
BrowserUI.doCommand("cmd_newTabKey");
|
||||||
let newTab = Browser.selectedTab;
|
let newTab = Browser.selectedTab;
|
||||||
yield newTab.pageShowPromise;
|
yield newTab.pageShowPromise;
|
||||||
|
|
||||||
@ -232,3 +232,27 @@ gTests.push({
|
|||||||
Browser.closeTab(mozTab, { forceClose: true });
|
Browser.closeTab(mozTab, { forceClose: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gTests.push({
|
||||||
|
desc: "Bug 933989 - New tab button in tab bar always sets focus to the url bar, triggering soft keyboard",
|
||||||
|
run: function () {
|
||||||
|
let mozTab = yield addTab("about:mozilla");
|
||||||
|
|
||||||
|
// addTab will dismiss navbar, but lets check anyway.
|
||||||
|
ok(!ContextUI.navbarVisible, "navbar dismissed");
|
||||||
|
|
||||||
|
BrowserUI.doCommand("cmd_newTab");
|
||||||
|
let newTab = Browser.selectedTab;
|
||||||
|
yield newTab.pageShowPromise;
|
||||||
|
|
||||||
|
yield waitForCondition(() => ContextUI.navbarVisible);
|
||||||
|
ok(ContextUI.navbarVisible, "navbar visible");
|
||||||
|
|
||||||
|
let edit = document.getElementById("urlbar-edit");
|
||||||
|
|
||||||
|
ok(!edit.focused, "Edit is not focused");
|
||||||
|
|
||||||
|
Browser.closeTab(newTab, { forceClose: true });
|
||||||
|
Browser.closeTab(mozTab, { forceClose: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user