Commit 5d922af0 authored by Felipe Gomes's avatar Felipe Gomes
Browse files

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
parent c403f8b0
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment