Bug 797134 - Right-clicking on the Social API ambient notification buttons opens the panel and context menu. r=jaws
authorShane Caraveo <mixedpuppy@gmail.com>
Wed, 03 Oct 2012 13:57:13 -0700
changeset 109248 1fca620575ce2dc6dca97addfd5ec58d1051e6b2
parent 109247 c92cb673ade14269f78e09df61c534ff5781f554
child 109249 5433c7edcc86883617b3cc3b87105765c297f99e
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersjaws
bugs797134
milestone18.0a1
Bug 797134 - Right-clicking on the Social API ambient notification buttons opens the panel and context menu. r=jaws
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -612,17 +612,20 @@ var SocialToolbar = {
       let image, label;
       if (stack) {
         image = document.getElementById(imageId);
         label = document.getElementById(labelId);
       } else {
         let box = document.createElement("box");
         box.classList.add("toolbarbutton-1");
         box.setAttribute("id", iconId);
-        box.addEventListener("mousedown", function (e) { SocialToolbar.showAmbientPopup(box); }, false);
+        box.addEventListener("mousedown", function (e) {
+          if (e.button == 0)
+            SocialToolbar.showAmbientPopup(box);
+        }, false);
         box.setAttribute("notificationFrameId", notificationFrameId);
         stack = document.createElement("stack");
         stack.setAttribute("id", stackId);
         stack.classList.add("social-notification-icon-stack");
         stack.classList.add("toolbarbutton-icon");
         image = document.createElement("image");
         image.setAttribute("id", imageId);
         image = stack.appendChild(image);