forked from ZenBrowserMirrors/zen-desktop
Refactor tab handling in ZenGlanceManager and update tab filtering logic for improved performance
This commit is contained in:
parent
61190233fc
commit
093074a9fc
2 changed files with 27 additions and 16 deletions
|
@ -245,7 +245,8 @@
|
||||||
this.overlay.style.pointerEvents = 'none';
|
this.overlay.style.pointerEvents = 'none';
|
||||||
this.quickCloseGlance({ justAnimateParent: true, clearID: false });
|
this.quickCloseGlance({ justAnimateParent: true, clearID: false });
|
||||||
const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition;
|
const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition;
|
||||||
gZenUIManager.motion.animate(
|
gZenUIManager.motion
|
||||||
|
.animate(
|
||||||
this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer'),
|
this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer'),
|
||||||
{
|
{
|
||||||
scale: [0.98, 1],
|
scale: [0.98, 1],
|
||||||
|
@ -257,7 +258,8 @@
|
||||||
type: 'spring',
|
type: 'spring',
|
||||||
bounce: 0.2,
|
bounce: 0.2,
|
||||||
}
|
}
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer').removeAttribute('style');
|
this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer').removeAttribute('style');
|
||||||
});
|
});
|
||||||
gZenUIManager.motion
|
gZenUIManager.motion
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..8063e0149827bb3da06b25079efa2a5a6fdfbb3a 100644
|
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..cca93dc8fe6300a5bee22029bbe2369e9240ba35 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -406,11 +406,39 @@
|
@@ -406,11 +406,39 @@
|
||||||
|
@ -196,6 +196,15 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..8063e0149827bb3da06b25079efa2a5a
|
||||||
if (
|
if (
|
||||||
!bulkOrderedOpen &&
|
!bulkOrderedOpen &&
|
||||||
((openerTab &&
|
((openerTab &&
|
||||||
|
@@ -3780,7 +3859,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type {MozTabbrowserTab|undefined} */
|
||||||
|
- let tabAfter = this.tabs.at(index);
|
||||||
|
+ let tabAfter = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
|
||||||
|
this.tabContainer._invalidateCachedTabs();
|
||||||
|
|
||||||
|
if (tabGroup) {
|
||||||
@@ -4095,6 +4174,9 @@
|
@@ -4095,6 +4174,9 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue