Bug 1563040 - [marionette] Call window.focus() directly for the newly opened window. r=webdriver-reviewers,ato

Differential Revision: https://phabricator.services.mozilla.com/D36873

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henrik Skupin 2019-08-02 06:32:21 +00:00
Родитель 0b9efb84de
Коммит a52b45bb8b
2 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -353,11 +353,7 @@ browser.Context = class {
subject => subject == win
);
// Bug 1509380 - Missing focus/activate event when Firefox is not
// the top-most application. As such wait for the next tick, and
// manually focus the newly opened window.
win.setTimeout(() => win.focus(), 0);
win.focus();
await Promise.all([activated, focused, startup]);
// The new window shouldn't get focused. As such set the

Просмотреть файл

@ -163,10 +163,7 @@ class WindowManagerMixin(object):
let win = window.openDialog(url, null, "chrome,centerscreen");
let focused = waitForFocus(win);
// Bug 1509380 - Missing focus/activate event when Firefox is not
// the top-most application. As such wait for the next tick, and
// manually focus the newly opened window.
win.setTimeout(() => win.focus(), 0);
win.focus();
await focused;
// The new window shouldn't get focused. As such set the