Bug 1397236 - Changing positioning of navigator-toolbox while a descendent popup is open causes the popup to close. We don't need to change the positioning of the navigator-toolbox on the fly, and can instead always keep it as position:relative for the library animation. r=Gijs
authorJared Wein <jwein@mozilla.com>
Thu, 07 Sep 2017 03:46:46 -0400
changeset 428980 1fae43b4534cf25d917e544ca02e7ad6b1aa1736
parent 428979 481d7cc2f6f06ea35794403dc9291d277910d6b9
child 428981 26d748e596426e844646403acd5f0e93c1b3019b
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1397236
milestone57.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 1397236 - Changing positioning of navigator-toolbox while a descendent popup is open causes the popup to close. We don't need to change the positioning of the navigator-toolbox on the fly, and can instead always keep it as position:relative for the library animation. r=Gijs MozReview-Commit-ID: HXbjhQFCplb
browser/base/content/browser-places.js
browser/themes/shared/browser.inc.css
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1550,17 +1550,16 @@ var LibraryUI = {
     animatableBox.style.setProperty("--library-button-height", libraryBounds.height + "px");
     animatableBox.style.setProperty("--library-icon-x", iconBounds.x + "px");
     if (navBar.hasAttribute("brighttext")) {
       animatableBox.setAttribute("brighttext", "true");
     } else {
       animatableBox.removeAttribute("brighttext");
     }
     animatableBox.removeAttribute("fade");
-    gNavToolbox.setAttribute("animate", animation);
     libraryButton.setAttribute("animate", animation);
     animatableBox.setAttribute("animate", animation);
     if (!this._libraryButtonAnimationEndListeners[animation]) {
       this._libraryButtonAnimationEndListeners[animation] = event => {
         this._libraryButtonAnimationEndListener(event, animation);
       }
     }
     animatableBox.addEventListener("animationend", this._libraryButtonAnimationEndListeners[animation]);
@@ -1573,17 +1572,16 @@ var LibraryUI = {
       animatableBox.setAttribute("fade", "true");
     } else if (aEvent.animationName == `library-${animation}-fade`) {
       animatableBox.removeEventListener("animationend", LibraryUI._libraryButtonAnimationEndListeners[animation]);
       animatableBox.removeAttribute("animate");
       animatableBox.removeAttribute("fade");
       let libraryButton = document.getElementById("library-button");
       // Put the 'fill' back in the normal icon.
       libraryButton.removeAttribute("animate");
-      gNavToolbox.removeAttribute("animate");
     }
   },
 };
 
 /**
  * Handles the bookmarks menu-button in the toolbar.
  */
 
--- a/browser/themes/shared/browser.inc.css
+++ b/browser/themes/shared/browser.inc.css
@@ -51,19 +51,19 @@
   -moz-outline-radius: 2px;
 }
 
 #navigator-toolbox > toolbar[customizing]:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):empty {
   /* Avoid the toolbar having no height when there's no items in it */
   min-height: 22px;
 }
 
-/* Library animation */
+/* Required for Library animation */
 
-#navigator-toolbox[animate] {
+#navigator-toolbox {
   position: relative;
 }
 
 #library-animatable-box {
   display: none;
 }
 
 #library-animatable-box[animate] {