Bug 1454440 - Focus the window directly instead of using commandDispatcher in the mac Window menu;r=Gijs

This fixes the Window menu with top-level HTML windows, which don't have `commandDispatcher`
defined on the document.

MozReview-Commit-ID: I7T1LrMf8Ik

--HG--
extra : rebase_source : e2ca69690cfa11716a17dc0ce268a7c4a4aa7e2b
This commit is contained in:
Brian Grinstead 2018-04-16 11:05:01 -07:00
Родитель 8a8cc8c9a7
Коммит d47332f45b
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -21,7 +21,7 @@ function macWindowMenuDidShow() {
if (win.windowState == window.STATE_MINIMIZED) {
win.restore();
}
win.document.commandDispatcher.focusedWindow.focus();
win.focus();
});
frag.appendChild(item);
}