feat: Improved tab transitions and fixed a couple of issues with glance, b=(no-bug), c=tabs, common, glance, split-view, workspaces

This commit is contained in:
Mr. M
2025-05-25 17:06:22 +02:00
parent dda1dab6f3
commit 09ca430b88
14 changed files with 374 additions and 176 deletions

View File

@@ -104,6 +104,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
);
window.addEventListener('TabClose', this.handleTabClose.bind(this));
window.addEventListener('TabBrowserDiscarded', this.handleTabBrowserDiscarded.bind(this));
window.addEventListener('TabSelect', this.onTabSelect.bind(this));
this.initializeContextMenu();
this.insertIntoContextMenu();
@@ -150,6 +151,17 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
this.removeTabFromGroup(tab, groupIndex, true);
}
/**
* @param {Event} event - The event that triggered the tab browser discard.
* @description Handles the tab browser discard event.
*/
async handleTabBrowserDiscarded(event) {
const tab = event.target;
if (tab.group?.hasAttribute('split-view-group')) {
gBrowser.explicitUnloadTabs(tab.group.tabs);
}
}
/**
* @param {Event} event - The event that triggered the tab select.
* @description Handles the tab select event.