mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-04 11:04:39 +00:00
fix: Fixed glance close animation replay, b=closes #11130, c=glance
This commit is contained in:
@@ -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")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
Reference in New Issue
Block a user