From e68b5e5c267372db7e931ac40c39cabf0da759af Mon Sep 17 00:00:00 2001 From: fen4flo <75260616+FlorianButz@users.noreply.github.com> Date: Mon, 21 Sep 2026 16:52:29 +0200 Subject: [PATCH] gh-15438: Fix library compact mode animation (gh-15502) --- src/zen/library/ZenLibrary.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zen/library/ZenLibrary.mjs b/src/zen/library/ZenLibrary.mjs index e324e8612..6e0fc91bf 100644 --- a/src/zen/library/ZenLibrary.mjs +++ b/src/zen/library/ZenLibrary.mjs @@ -149,13 +149,13 @@ export class ZenLibrary extends MozLitElement { ? compactModeOffsetDirection : 0; + const leftAligned = this.#libraryOnRight ? -1 : 1; let webOffset = - (this.#libraryOnRight ? -1 : 1) * (libraryWidth - this.#toolboxWidth) + - compactModeOffset; + leftAligned * (libraryWidth - this.#toolboxWidth) + compactModeOffset; this.style.setProperty( "transform", - `translateX(calc(-100% * (1 - ${value})))` + `translateX(calc(${leftAligned} * -100% * (1 - ${value})))` ); lazy.appContentWrapper?.style.setProperty( "transform", @@ -473,8 +473,8 @@ export class ZenLibrary extends MozLitElement { if (!this.instance && createIfMissing) { this.instance = new ZenLibrary(); this.instance.style.visibility = "collapse"; - const mountRoot = document.getElementById("zen-main-app-wrapper"); - mountRoot.append(this.instance); + const mountAfter = document.getElementById("navigator-toolbox"); + mountAfter.after(this.instance); } return this.instance; }