From c0c957cbff47668b297ea1d54732411d5b2f4744 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Sun, 5 Apr 2026 20:38:04 +0200 Subject: [PATCH] gh-11667: Fixed unable to install addons in compact mode (gh-13097) --- .../modules/PopupNotifications-sys-mjs.patch | 20 +++++++++++++++++++ src/zen/compact-mode/ZenCompactMode.mjs | 7 +++++-- src/zen/compact-mode/sidebar.inc.css | 2 +- src/zen/compact-mode/toolbar.inc.css | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/toolkit/modules/PopupNotifications-sys-mjs.patch diff --git a/src/toolkit/modules/PopupNotifications-sys-mjs.patch b/src/toolkit/modules/PopupNotifications-sys-mjs.patch new file mode 100644 index 000000000..20ffbc3ac --- /dev/null +++ b/src/toolkit/modules/PopupNotifications-sys-mjs.patch @@ -0,0 +1,20 @@ +diff --git a/toolkit/modules/PopupNotifications.sys.mjs b/toolkit/modules/PopupNotifications.sys.mjs +index 393f98c71a3b82d0af8ae0e6a863c2ed2963a5db..4a064887e297102353870db9d82f867575dccbef 100644 +--- a/toolkit/modules/PopupNotifications.sys.mjs ++++ b/toolkit/modules/PopupNotifications.sys.mjs +@@ -1540,6 +1540,15 @@ PopupNotifications.prototype = { + ) { + for (let anchorElement of anchorElements) { + anchorElement.setAttribute(ICON_ATTRIBUTE_SHOWING, "true"); ++ let toolbox = anchorElement.closest("#navigator-toolbox"); ++ if (toolbox) { ++ // Disable transitions for now, see gh-11667 ++ toolbox.style.transition = "none"; ++ toolbox.setAttribute("zen-compact-mode-active", "true"); ++ anchorElement.ownerGlobal.setTimeout(() => { ++ toolbox.style.transition = ""; ++ }, 0); ++ } + } + }, + diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index 4d92efe89..0914fb89b 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -177,6 +177,7 @@ window.gZenCompactModeManager = { const attributes = [ "panelopen", "open", + "opening", "breakout-extend", "zen-floating-urlbar", ]; @@ -185,7 +186,8 @@ window.gZenCompactModeManager = { [ { selector: - ":is([panelopen='true'], [open='true'], [breakout-extend='true']):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)", + ":where([panelopen='true'], [open='true'], [showing='true'], [breakout-extend='true'])" + + ":not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)", }, ], "zen-compact-mode-active", @@ -196,7 +198,8 @@ window.gZenCompactModeManager = { [ { selector: - ":is([panelopen='true'], [open='true'], #urlbar:focus-within, [breakout-extend='true']):not(.zen-compact-mode-ignore)", + ":where([panelopen='true'], [open='true'], [showing='true'], #urlbar:focus-within, [breakout-extend='true'])" + + ":not(.zen-compact-mode-ignore)", }, ], "zen-compact-mode-active", diff --git a/src/zen/compact-mode/sidebar.inc.css b/src/zen/compact-mode/sidebar.inc.css index 9d665df58..0422d3018 100644 --- a/src/zen/compact-mode/sidebar.inc.css +++ b/src/zen/compact-mode/sidebar.inc.css @@ -144,7 +144,7 @@ } } - #navigator-toolbox:is( + #navigator-toolbox:where( [zen-has-hover], [zen-user-show], [zen-has-empty-tab], [flash-popup], [has-popup-menu], [movingtab], diff --git a/src/zen/compact-mode/toolbar.inc.css b/src/zen/compact-mode/toolbar.inc.css index 484f98c25..e6bcf7b1a 100644 --- a/src/zen/compact-mode/toolbar.inc.css +++ b/src/zen/compact-mode/toolbar.inc.css @@ -49,7 +49,7 @@ } } - & #zen-appcontent-navbar-wrapper:is( + & #zen-appcontent-navbar-wrapper:where( [zen-has-hover], [has-popup-menu], [zen-compact-mode-active]