Bug 1522128 - Fix context sensitive nature of context menu on chat accounts. r=florian
authorPatrick Cloke <clokep@gmail.com>
Wed, 23 Jan 2019 11:26:54 -0500
changeset 34278 043b81dfc262b56fdcc330b9a8dbf81ac49071dd
parent 34277 a33001c055c0772bb363e1b5a320e0a6bb36828a
child 34279 a770f9f6ca8155aeae822b10f0e21df94910db9e
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersflorian
bugs1522128
Bug 1522128 - Fix context sensitive nature of context menu on chat accounts. r=florian
mail/components/im/content/imAccounts.js
--- a/mail/components/im/content/imAccounts.js
+++ b/mail/components/im/content/imAccounts.js
@@ -355,17 +355,17 @@ var gAccountManager = {
         elt.setAttribute("disabled", "true");
       else
         elt.removeAttribute("disabled");
     }
   },
   onContextMenuShowing() {
     let targetElt = document.popupNode;
     let isAccount = targetElt instanceof Ci.nsIDOMXULSelectControlItemElement;
-    document.querySelector(".im-context-account-item").forEach(e => {
+    document.querySelectorAll(".im-context-account-item").forEach(e => {
       e.hidden = !isAccount;
     });
     if (isAccount) {
       let account = targetElt.account;
       let hiddenItems = {
         connect: !account.disconnected,
         disconnect: account.disconnected || account.disconnecting,
         cancelReconnection: !targetElt.hasAttribute("reconnectPending"),