feat: Dont close essentials when they are unloaded, b=no-bug, c=folders, tabs

This commit is contained in:
Mr. M
2025-09-02 12:16:52 +02:00
parent 57635ff586
commit 8c28dc9e89
3 changed files with 10 additions and 4 deletions

View File

@@ -1054,7 +1054,7 @@
// We don't need to do anything if the URL is invalid. e.g. about:blank
}
let tabLabel = tab.label || '';
let iconURL = gBrowser.getIcon(tab) || PlacesUtils.favicons.defaultFavicon;
let iconURL = gBrowser.getIcon(tab) || PlacesUtils.favicons.defaultFavicon.spec;
icon.src = iconURL;

View File

@@ -393,6 +393,8 @@ zen-folder {
border: none !important;
outline: none !important;
flex: 1;
text-overflow: ellipsis;
white-space: nowrap;
}
#zen-folder-tabs-list {
@@ -416,6 +418,8 @@ zen-folder {
flex-shrink: 0;
margin-inline-end: 10px;
margin-inline-start: 4px;
fill: currentColor;
-moz-context-properties: fill;
}
.folders-tabs-list-item-labels {

View File

@@ -812,7 +812,9 @@
if (selectedTab.group?.hasAttribute('split-view-group')) {
tabsToUnload = selectedTab.group.tabs;
}
const allAreUnloaded = tabsToUnload.every((tab) => tab.hasAttribute('pending'));
const allAreUnloaded = tabsToUnload.every(
(tab) => tab.hasAttribute('pending') && !tab.hasAttribute('zen-essential')
);
if (allAreUnloaded && closeIfPending) {
return await this._onCloseTabShortcut(event, selectedTab, { behavior: 'close' });
}
@@ -897,7 +899,7 @@
const faviconData = await PlacesUtils.favicons.getFaviconForPage(pageUrl);
if (!faviconData) {
// empty favicon
return 'data:image/png;base64,';
return null;
}
return faviconData.dataURI;
} catch (ex) {
@@ -1205,7 +1207,7 @@
} else {
tab.setAttribute('zen-pinned-changed', 'true');
}
tab.style.setProperty('--zen-original-tab-icon', `url(${pin.iconUrl.spec})`);
tab.style.setProperty('--zen-original-tab-icon', `url(${pin.iconUrl?.spec})`);
}
removeTabContainersDragoverClass(hideIndicator = true) {