mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-05 11:27:16 +00:00
fix: Fixed hyperlinks being removed at startup, b=closes #11639, c=tabs, workspaces
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb22176c60c4e 100644
|
||||
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..6894412f5dcf632c1d4c3dabeffabf9e5dd96222 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -127,6 +127,8 @@ const TAB_EVENTS = [
|
||||
@@ -122,7 +122,15 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
|
||||
selectTab = Math.min(selectTab, winData.tabs.length);
|
||||
}
|
||||
|
||||
@@ -5809,6 +5820,8 @@ var SessionStoreInternal = {
|
||||
@@ -5788,6 +5799,7 @@ var SessionStoreInternal = {
|
||||
if (overwriteTabs) {
|
||||
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
|
||||
if (!tabbrowser.tabs[i].selected) {
|
||||
+ aWindow.gZenWorkspaces._shouldOverrideTabs = true;
|
||||
tabbrowser.removeTab(tabbrowser.tabs[i]);
|
||||
}
|
||||
}
|
||||
@@ -5809,6 +5821,8 @@ var SessionStoreInternal = {
|
||||
winData.tabs,
|
||||
winData.groups ?? []
|
||||
);
|
||||
@@ -131,7 +139,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
|
||||
this._log.debug(
|
||||
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
|
||||
);
|
||||
@@ -6372,6 +6385,25 @@ var SessionStoreInternal = {
|
||||
@@ -6372,6 +6386,25 @@ var SessionStoreInternal = {
|
||||
|
||||
// Most of tabData has been restored, now continue with restoring
|
||||
// attributes that may trigger external events.
|
||||
@@ -157,7 +165,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
|
||||
|
||||
if (tabData.pinned) {
|
||||
tabbrowser.pinTab(tab);
|
||||
@@ -7290,7 +7322,7 @@ var SessionStoreInternal = {
|
||||
@@ -7290,7 +7323,7 @@ var SessionStoreInternal = {
|
||||
|
||||
let groupsToSave = new Map();
|
||||
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
||||
@@ -166,7 +174,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
|
||||
// Adjust window.selected
|
||||
if (tIndex + 1 < window.selected) {
|
||||
window.selected -= 1;
|
||||
@@ -7305,7 +7337,7 @@ var SessionStoreInternal = {
|
||||
@@ -7305,7 +7338,7 @@ var SessionStoreInternal = {
|
||||
);
|
||||
// We don't want to increment tIndex here.
|
||||
continue;
|
||||
|
||||
@@ -141,7 +141,10 @@
|
||||
position: relative;
|
||||
opacity: 1;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
& toolbarseparator {
|
||||
height: 1px;
|
||||
|
||||
@@ -973,6 +973,7 @@ class nsZenWorkspaces extends nsZenMultiWindowFeature {
|
||||
const cleanup = () => {
|
||||
delete this._tabToSelect;
|
||||
delete this._tabToRemoveForEmpty;
|
||||
delete this._shouldOverrideTabs;
|
||||
resolveSelectPromise();
|
||||
};
|
||||
|
||||
@@ -988,7 +989,7 @@ class nsZenWorkspaces extends nsZenMultiWindowFeature {
|
||||
delete this._initialTab;
|
||||
}
|
||||
|
||||
if (this._tabToRemoveForEmpty && !removedEmptyTab) {
|
||||
if (this._tabToRemoveForEmpty && !removedEmptyTab && !this._shouldOverrideTabs) {
|
||||
const tabs = gBrowser.tabs.filter((tab) => !tab.collapsed);
|
||||
if (
|
||||
typeof this._tabToSelect === 'number' &&
|
||||
|
||||
Reference in New Issue
Block a user