Skip to content

Commit 5f291ba

Browse files
nielslyngsoeiOvergaard
authored andcommitted
no need to redirect when removing tab. router handles this fine
1 parent eec7b01 commit 5f291ba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
269269
#deleteTab(tabId?: string) {
270270
if (!tabId) return;
271271
this.#workspaceContext?.structure.removeContainer(null, tabId);
272-
// TODO: We should only navigate away if it was the last tab and if it was the active one... [NL]
273-
if (this.#tabsStructureHelper?.isOwnerChildContainer(tabId)) {
274-
window.history.replaceState(null, '', this._routerPath + (this._routes[0]?.path ?? '/root'));
272+
if (this._activeTabId === tabId) {
273+
this._activeTabId = undefined;
275274
}
276275
}
277276
async #addTab() {

0 commit comments

Comments
 (0)