mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-02 07:58:40 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user