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 37133 af0b4f8de1a398719748161891be9f0517d0c53f
parent 37132 e72e040cbe8e404ce81f9487210abd35255818e6
child 37134 8f5ce14d70f4ad8d2b22624f2d5e178790e2ca68
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
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 }
     );
   }
 }