Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions browser/base/content/browser-workspaces.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -552,15 +552,23 @@ export const gWorkspaces = {
async deleteWorkspace(workspaceId) {
let windowId = await this.getCurrentWindowId();
let currentWorkspaceId = await this.getCurrentWorkspaceId();
await WorkspacesService.deleteWorkspace(workspaceId, windowId);
this.removeWorkspaceTabs(workspaceId);
if (workspaceId == currentWorkspaceId) {
await this.changeWorkspace(
await WorkspacesWindowIdUtils.getDefaultWorkspaceId(windowId),
0
);
const workspace = await this.getWorkspaceById(workspaceId);
const result = Services.prompt.confirm(
window,
this.l10n.formatValueSync("delete-workspace-prompt-title"),
this.l10n.formatValueSync("delete-workspace-prompt-text", { name: workspace.name }),
);
if (result) {
await WorkspacesService.deleteWorkspace(workspaceId, windowId);
this.removeWorkspaceTabs(workspaceId);
if (workspaceId == currentWorkspaceId) {
await this.changeWorkspace(
await WorkspacesWindowIdUtils.getDefaultWorkspaceId(windowId),
0
);
}
this.rebuildWorkspacesToolbar();
}
this.rebuildWorkspacesToolbar();
},

async renameWorkspace(workspaceId, newName) {
Expand Down