From 3e89b1dae62f28a5db5aceddd20ec396b8d6173c Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 1 Feb 2025 17:29:32 +0100 Subject: [PATCH] Disable tab hover preview and clean up animation code in ZenGlanceManager --- src/browser/app/profile/zen-browser.js | 4 +-- .../base/zen-components/ZenGlanceManager.mjs | 32 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index 0fe55448f..9f74b51a5 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -8,9 +8,7 @@ #endif #endif -pref("browser.tabs.cardPreview.enabled", true); -pref("browser.tabs.hoverPreview.enabled", true); -pref("browser.tabs.cardPreview.delayMs", 100); +pref("browser.tabs.hoverPreview.enabled", false); #ifdef MOZ_UPDATE_CHANNEL pref("devtools.debugger.prompt-connection", true); diff --git a/src/browser/base/zen-components/ZenGlanceManager.mjs b/src/browser/base/zen-components/ZenGlanceManager.mjs index e03b3da00..38fc44495 100644 --- a/src/browser/base/zen-components/ZenGlanceManager.mjs +++ b/src/browser/base/zen-components/ZenGlanceManager.mjs @@ -364,19 +364,25 @@ this.#currentTab.removeAttribute('zen-glance-tab'); gBrowser.selectedTab = this.#currentTab; this.currentParentTab.linkedBrowser.closest('.browserSidebarContainer').classList.remove('zen-glance-background'); - gZenUIManager.motion.animate(this.browserWrapper, { - width: ['85%', '100%'], - height: ['100%', '100%'], - }, { - duration: 0.4, - type: 'spring', - }).then(() => { - this.browserWrapper.removeAttribute('animate-full'); - this.overlay.classList.remove('zen-glance-overlay'); - this.browserWrapper.removeAttribute('style'); - this.animatingFullOpen = false; - this.closeGlance({ noAnimation: true }); - }); + gZenUIManager.motion + .animate( + this.browserWrapper, + { + width: ['85%', '100%'], + height: ['100%', '100%'], + }, + { + duration: 0.4, + type: 'spring', + } + ) + .then(() => { + this.browserWrapper.removeAttribute('animate-full'); + this.overlay.classList.remove('zen-glance-overlay'); + this.browserWrapper.removeAttribute('style'); + this.animatingFullOpen = false; + this.closeGlance({ noAnimation: true }); + }); } openGlanceForBookmark(event) {