Bug 1622642 - Pass correct address book URI to edit card dialog. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 31 Mar 2020 10:51:56 +1300
changeset 38645 d723075a045482d5d467d74e57c61c1b2f71a5cc
parent 38644 3c16add31ebc743d7cb8e0b18f037b3ac6e95572
child 38646 f38c4f986fa7dc0a930c2b1a60fca96471d29171
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersmkmelin
bugs1622642
Bug 1622642 - Pass correct address book URI to edit card dialog. r=mkmelin
mail/components/addrbook/content/abCommon.js
--- a/mail/components/addrbook/content/abCommon.js
+++ b/mail/components/addrbook/content/abCommon.js
@@ -525,17 +525,19 @@ function AbEditCard(card) {
   // but not allowing AOL special groups to be edited.
   if (!card) {
     return;
   }
 
   if (card.isMailList) {
     goEditListDialog(card, card.mailListURI);
   } else {
-    goEditCardDialog(getSelectedDirectoryURI(), card);
+    let dirId = card.directoryId.split("&")[0];
+    let directory = MailServices.ab.getDirectoryFromId(dirId);
+    goEditCardDialog(directory.URI, card);
   }
 }
 
 function AbNewMessage() {
   let msgComposeType = Ci.nsIMsgCompType;
   let msgComposeFormat = Ci.nsIMsgCompFormat;
 
   let params = Cc[