Bug 1790815 - Don't raise the window for tab-modal SubDialogs and in print. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D157599
This commit is contained in:
Emilio Cobos Álvarez 2022-10-17 20:37:23 +00:00
Родитель ca077475ed
Коммит 8e2776a5e7
2 изменённых файлов: 2 добавлений и 4 удалений

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

@ -355,9 +355,7 @@ var PrintEventHandler = {
await new Promise(resolve => window.requestAnimationFrame(resolve));
// Now that we're showing the form, select the destination select.
window.focus();
let fm = Services.focus;
fm.setFocus(document.getElementById("printer-picker"), fm.FLAG_SHOWRING);
document.getElementById("printer-picker").focus({ focusVisible: true });
await initialPreviewDone;
},

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

@ -879,7 +879,7 @@ SubDialog.prototype = {
if (!focusedElement) {
// Ensure the focus is pulled out of the content document even if there's
// nothing focusable in the dialog.
this._frame.contentWindow.focus();
this._frame.focus();
}
},