Bug 1588006 - Port bug 1553804: Use correct window opener when opening LDAP panel for add/edit. r=aceman
authorJorg K <jorgk@jorgk.com>
Sat, 12 Oct 2019 22:38:29 +0200
changeset 27904 af0b4f8de1a398719748161891be9f0517d0c53f
parent 27903 e72e040cbe8e404ce81f9487210abd35255818e6
child 27905 8f5ce14d70f4ad8d2b22624f2d5e178790e2ca68
push id16549
push usermozilla@jorgk.com
push dateSat, 12 Oct 2019 21:58:00 +0000
treeherdercomm-central@9ec80cfd9711 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1588006, 1553804
Bug 1588006 - Port bug 1553804: Use correct window opener when opening LDAP panel for add/edit. r=aceman
mail/components/addrbook/content/abCommon.js
mailnews/addrbook/prefs/content/pref-editdirectories.js
--- a/mail/components/addrbook/content/abCommon.js
+++ b/mail/components/addrbook/content/abCommon.js
@@ -213,17 +213,17 @@ function SendCommandToResultsPane(comman
   ResultsPaneController.doCommand(command);
 
   // if we are sending the command so the results pane
   // we should focus the results pane
   gAbResultsTree.focus();
 }
 
 function AbNewLDAPDirectory() {
-  window.openDialog(
+  window.docShell.rootTreeItem.domWindow.openDialog(
     "chrome://messenger/content/addressbook/pref-directory-add.xul",
     "",
     "chrome,modal,resizable=no,centerscreen",
     null
   );
 }
 
 function AbNewAddressBook() {
--- a/mailnews/addrbook/prefs/content/pref-editdirectories.js
+++ b/mailnews/addrbook/prefs/content/pref-editdirectories.js
@@ -136,17 +136,17 @@ function dblClickDirectory(event) {
 
 function editDirectory() {
   var abList = document.getElementById("directoriesList");
 
   if (abList && abList.selectedItem) {
     let abURI = abList.value;
     let ab = MailServices.ab.getDirectory(abURI);
 
-    window.openDialog(
+    window.docShell.rootTreeItem.domWindow.openDialog(
       ab.propertiesChromeURI,
       "editDirectory",
       "chrome,modal=yes,resizable=no",
       { selectedDirectory: ab }
     );
   }
 }