Bug 941196 - [Australis] Menu panel can move around when opening a long subview. r=Gijs, a=sledru.
authorMike Conley <mconley@mozilla.com>
Mon, 10 Feb 2014 11:06:00 -0500
changeset 182838 5214e724884d7682b74cdd8a6e9e6fe509977975
parent 182837 c3caf6accf2db05cbd126aee442ff0635dd92cef
child 182839 52c5fa3145041f163da295ff2816f0c9cd0f41de
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, sledru
bugs941196
milestone29.0a2
Bug 941196 - [Australis] Menu panel can move around when opening a long subview. r=Gijs, a=sledru.
browser/components/customizableui/content/panelUI.xml
--- a/browser/components/customizableui/content/panelUI.xml
+++ b/browser/components/customizableui/content/panelUI.xml
@@ -284,16 +284,22 @@
               if (this.showingSubView) {
                 setTimeout(this._syncContainerWithSubView.bind(this), 0);
               } else if (!this.transitioning) {
                 setTimeout(this._syncContainerWithMainView.bind(this), 0);
               }
               break;
             case "popupshowing":
               this.setAttribute("panelopen", "true");
+              // Bug 941196 - The panel can get taller when opening a subview. Disabling
+              // autoPositioning means that the panel won't jump around if an opened
+              // subview causes the panel to exceed the dimensions of the screen in the
+              // direction that the panel originally opened in. This property resets
+              // every time the popup closes, which is why we have to set it each time.
+              this._panel.autoPosition = false;
               this._syncContainerWithMainView();
               break;
             case "popupshown":
               this._setMaxHeight();
               break;
             case "popuphidden":
               this.removeAttribute("panelopen");
               this._mainView.style.removeProperty("height");