mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-02 10:04:37 +00:00
fix: Fixed dragging tabs to different windows causing freeze, b=closes #12178, c=tabs
This commit is contained in:
@@ -164,6 +164,21 @@ export class nsZenSessionManager {
|
||||
} catch {
|
||||
/* ignore errors reading recovery data */
|
||||
}
|
||||
if (!data.recoverYData) {
|
||||
try {
|
||||
data.recoveryData = await IOUtils.readJSON(
|
||||
PathUtils.join(
|
||||
Services.dirsvc.get("ProfD", Ci.nsIFile).path,
|
||||
"sessionstore-backups",
|
||||
"recovery.jsonlz4"
|
||||
),
|
||||
{ decompress: true }
|
||||
);
|
||||
this.log("Recovered recovery data from sessionstore-backups");
|
||||
} catch {
|
||||
/* ignore errors reading recovery data */
|
||||
}
|
||||
}
|
||||
this._migrationData = data;
|
||||
} catch {
|
||||
/* ignore errors during migration */
|
||||
|
||||
@@ -563,7 +563,25 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
return false;
|
||||
}
|
||||
movingTabs = movingTabs.map((tab) => {
|
||||
return tab.ownerGlobal !== window ? gBrowser.adoptTab(tab) : tab;
|
||||
let workspaceId;
|
||||
if (tab.ownerGlobal !== window) {
|
||||
if (
|
||||
!tab.hasAttribute("zen-essential") &&
|
||||
tab.getAttribute("zen-workspace-id") != gZenWorkspaces.activeWorkspace
|
||||
) {
|
||||
workspaceId = gZenWorkspaces.activeWorkspace;
|
||||
tab.ownerGlobal.gBrowser.selectedTab = tab.ownerGlobal.gBrowser._findTabToBlurTo(
|
||||
tab,
|
||||
movingTabs
|
||||
);
|
||||
tab.ownerGlobal.gZenWorkspaces.moveTabToWorkspace(tab, workspaceId);
|
||||
}
|
||||
tab = gBrowser.adoptTab(tab);
|
||||
if (workspaceId) {
|
||||
tab.setAttribute("zen-workspace-id", workspaceId);
|
||||
}
|
||||
}
|
||||
return tab;
|
||||
});
|
||||
try {
|
||||
const pinnedTabsTarget = event.target.closest(
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.18.3b",
|
||||
"displayVersion": "1.18.4b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user