From 1b967a70807715472d7b6d39e613da94ad1bc31e Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:08:04 +0200 Subject: [PATCH] gh-14239: Fixed overflowing addons being moved on space creation (gh-14246) --- .../customizableui/CustomizableUI-sys-mjs.patch | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch index 0dba1ca9b..ee13d11b3 100644 --- a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch +++ b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs -index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98ff7c5f86 100644 +index d5d4596739cde5d3d49d6294867f5da122c526b8..c206cfb374542c496be9bf0305a0a80bbcf503b2 100644 --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -186,7 +186,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 }); lazy.log.debug( -@@ -7930,7 +7931,37 @@ class OverflowableToolbar { +@@ -7930,7 +7931,39 @@ class OverflowableToolbar { Math.max(targetWidth, targetChildrenWidth) ); totalAvailWidth = Math.ceil(totalAvailWidth); @@ -194,6 +194,8 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 + if (this.#target.id == 'nav-bar-customization-target' && + win.gZenVerticalTabsManager._hasSetSingleToolbar && + Services.prefs.getBoolPref("zen.view.overflow-webext-toolbar", true) && ++ !win.document.documentElement.hasAttribute("zen-creating-workspace") && ++ !win.document.documentElement.hasAttribute("inDOMFullscreen") && + !win.gURLBar.hasAttribute("breakout-extend")) { + const availSelectors = ":is(#page-action-buttons, #zen-copy-url-button, .unified-extensions-item, .urlbar-addon-page-action)"; + const width = [ @@ -225,7 +227,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 return { isOverflowing, targetContentWidth, totalAvailWidth }; } -@@ -7991,7 +8022,11 @@ class OverflowableToolbar { +@@ -7991,7 +8024,11 @@ class OverflowableToolbar { return; } } @@ -238,7 +240,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 lazy.log.debug( `Need ${minSize} but width is ${totalAvailWidth} so bailing` ); -@@ -8024,7 +8059,7 @@ class OverflowableToolbar { +@@ -8024,7 +8061,7 @@ class OverflowableToolbar { } } if (!inserted) { @@ -247,7 +249,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 } child.removeAttribute("cui-anchorid"); child.removeAttribute("overflowedItem"); -@@ -8150,6 +8185,9 @@ class OverflowableToolbar { +@@ -8150,6 +8187,9 @@ class OverflowableToolbar { * if no such list exists. */ get #webExtList() { @@ -257,7 +259,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 if (!this.#webExtListRef) { let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget"); if (!targetID) { -@@ -8161,6 +8199,9 @@ class OverflowableToolbar { +@@ -8161,6 +8201,9 @@ class OverflowableToolbar { let win = this.#toolbar.documentGlobal; let { panel } = win.gUnifiedExtensions; this.#webExtListRef = panel.querySelector(`#${targetID}`); @@ -267,7 +269,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98 } return this.#webExtListRef; } -@@ -8369,7 +8410,7 @@ class OverflowableToolbar { +@@ -8369,7 +8412,7 @@ class OverflowableToolbar { break; } case "mousedown": {