зеркало из https://github.com/mozilla/gecko-dev.git
Bug 827976 - Try to use an existing window first to open preferences. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D21082 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c403f8b002
Коммит
5d922af02c
|
@ -2805,13 +2805,15 @@ BrowserGlue.prototype = {
|
|||
* Open preferences even if there are no open windows.
|
||||
*/
|
||||
_openPreferences(...args) {
|
||||
if (Services.appShell.hiddenDOMWindow.openPreferences) {
|
||||
Services.appShell.hiddenDOMWindow.openPreferences(...args);
|
||||
let chromeWindow = BrowserWindowTracker.getTopWindow();
|
||||
if (chromeWindow) {
|
||||
chromeWindow.openPreferences(...args);
|
||||
return;
|
||||
}
|
||||
|
||||
let chromeWindow = BrowserWindowTracker.getTopWindow();
|
||||
chromeWindow.openPreferences(...args);
|
||||
if (Services.appShell.hiddenDOMWindow.openPreferences) {
|
||||
Services.appShell.hiddenDOMWindow.openPreferences(...args);
|
||||
}
|
||||
},
|
||||
|
||||
_openURLInNewWindow(url) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче