mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1398111 - [marionette] Update mainFrame and curFrame when switching chrome windows. r=ato
When switching between chrome windows Marionette doesn't update its references for the mainFrame (current chrome window) and curFrame (current frame inside the chrome window). Instead it gets currently only updated when a new chrome window opens. It means that in most cases Marionette sets the focus on the wrong chrome window and frame. --HG-- extra : rebase_source : 3aebd6a15e46f183b32f4d7cf6727ef6c370f6f3
This commit is contained in:
parent
80120fa560
commit
0e52e2a27a
@ -1620,10 +1620,12 @@ GeckoDriver.prototype.setWindowHandle = async function(
|
||||
}
|
||||
|
||||
} else {
|
||||
// Otherwise switch to the known chrome window, and activate the tab
|
||||
// if it's a content browser.
|
||||
// Otherwise switch to the known chrome window
|
||||
this.curBrowser = this.browsers[winProperties.outerId];
|
||||
this.mainFrame = this.curBrowser.window;
|
||||
this.curFrame = null;
|
||||
|
||||
// .. and activate the tab if it's a content browser.
|
||||
if ("tabIndex" in winProperties) {
|
||||
this.curBrowser.switchToTab(
|
||||
winProperties.tabIndex, winProperties.win, focus);
|
||||
|
Loading…
Reference in New Issue
Block a user