Bug 1382570 - Ignore non-left clicks on the bookmark icon. r=Gijs draft
authorErica Wright <ewright@mozilla.com>
Wed, 02 Aug 2017 16:20:52 -0400
changeset 619917 f607606a0e4dd1e8fe01d385dfd7a9e2544a510b
parent 619581 52285ea5e54c73d3ed824544cef2ee3f195f05e6
child 640536 bd64f53dc16cc8882a9c395820a9dac908f78e93
push id71862
push userbmo:ewright@mozilla.com
push dateWed, 02 Aug 2017 20:27:17 +0000
reviewersGijs
bugs1382570
milestone57.0a1
Bug 1382570 - Ignore non-left clicks on the bookmark icon. r=Gijs MozReview-Commit-ID: KrFYUijzawU
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1936,18 +1936,18 @@ var BookmarkingUI = {
     if (widget.overflowed) {
       // Close the overflow panel because the Edit Bookmark panel will appear.
       widget.node.removeAttribute("closemenu");
     }
     this.onStarCommand(aEvent);
   },
 
   onStarCommand(aEvent) {
-    // Ignore clicks on the star if we are updating its state.
-    if (!this._pendingUpdate) {
+    // Ignore non-left clicks on the star, or if we are updating its state.
+    if (!this._pendingUpdate && aEvent.button == 0) {
       let isBookmarked = this._itemGuids.size > 0;
       // Disable the old animation in photon
       if (!isBookmarked && !AppConstants.MOZ_PHOTON_THEME)
         this._showBookmarkedNotification();
       // Set up variables for new animation in Photon
       if (!isBookmarked && AppConstants.MOZ_PHOTON_ANIMATIONS) {
         BrowserUtils.setToolbarButtonHeightProperty(this.star);
         this.star.setAttribute("animate", "true");