Bug 849216 - open social toolbar popup in setTimeout handler to avoid auto-rollup handling. r=felipe
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 13 Mar 2013 09:31:39 +1100
changeset 124771 ac134bae8d29df6a8cbac7bb7c38a43ac0c2a045
parent 124770 bd8615bc2be53eb9f1553a5c756971aed02743fe
child 124772 29230c04b932cfa084a1b0afdccb4977e2bce572
push id24433
push useremorley@mozilla.com
push dateThu, 14 Mar 2013 12:21:10 +0000
treeherdermozilla-central@96af92fa87fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs849216
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 849216 - open social toolbar popup in setTimeout handler to avoid auto-rollup handling. r=felipe
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -1025,17 +1025,21 @@ var SocialToolbar = {
         }, true);
       }
     });
 
     let navBar = document.getElementById("nav-bar");
     let anchor = navBar.getAttribute("mode") == "text" ?
                    document.getAnonymousElementByAttribute(aToolbarButton, "class", "toolbarbutton-text") :
                    document.getAnonymousElementByAttribute(aToolbarButton, "class", "toolbarbutton-icon");
-    panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
+    // Bug 849216 - open the popup in a setTimeout so we avoid the auto-rollup
+    // handling from preventing it being opened in some cases.
+    setTimeout(function() {
+      panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
+    }, 0);
   },
 
   setPanelErrorMessage: function SocialToolbar_setPanelErrorMessage(aNotificationFrame) {
     if (!aNotificationFrame)
       return;
 
     let src = aNotificationFrame.getAttribute("src");
     aNotificationFrame.removeAttribute("src");