fix: Fixed glance close animation replay, b=closes #11130, c=glance

This commit is contained in:
mr. m
2025-11-03 22:49:46 +01:00
parent 42752f8145
commit 424de1bf91
2 changed files with 7 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
diff --git a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
index 773f595e89e268578ba153907babec95b58a155a..abe86fc3d243a85c4a8dbee854a2d0130f7270fd 100644
index 773f595e89e268578ba153907babec95b58a155a..7cb99cde00c19f50fd9aa48ab1efcfaeaef89771 100644
--- a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
+++ b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
@@ -937,6 +937,7 @@ export class AsyncTabSwitcher {
return !(
this.tabbrowser._printPreviewBrowsers.has(browser) ||
lazy.PictureInPicture.isOriginatingBrowser(browser)
+ || browser?.hasAttribute('zen-glance-background')
+ || browser?.parentNode?.parentNode?.parentNode?.classList?.contains("zen-glance-background")
);
}

View File

@@ -844,6 +844,10 @@
* @returns {Promise} Promise that resolves when closing is complete
*/
#animateGlanceClosing(onTabClose, browserSidebarContainer, sidebarButtons, setNewID) {
if (this.closingGlance) {
return;
}
this.closingGlance = true;
this._animating = true;
@@ -1008,6 +1012,7 @@
this.browserWrapper.removeAttribute('animate');
if (!this.#currentParentTab) {
this.closingGlance = false;
return;
}
@@ -1063,7 +1068,6 @@
this.contentWrapper = null;
lastCurrentTab.removeAttribute('zen-glance-tab');
lastCurrentTab._closingGlance = true;
this.#ignoreClose = true;
lastCurrentTab.dispatchEvent(new Event('GlanceClose', { bubbles: true }));