Hotfix: Browser navigation between Documents (#17783)
use `replaceState` over `pushState`
This commit is contained in:
@@ -34,7 +34,7 @@ export class UmbWorkspaceIsNewRedirectController extends UmbControllerBase {
|
||||
id: unique,
|
||||
});
|
||||
this.destroy();
|
||||
window.history.pushState({}, '', newPath);
|
||||
window.history.replaceState({}, '', newPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,11 +102,11 @@ export class UmbDocumentWorkspaceEditorElement extends UmbLitElement {
|
||||
|
||||
if (!route) {
|
||||
// TODO: Notice: here is a specific index used for fallback, this could be made more solid [NL]
|
||||
history.pushState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`);
|
||||
history.replaceState({}, '', `${this.#workspaceRoute}/${routes[routes.length - 3].path}`);
|
||||
return;
|
||||
}
|
||||
|
||||
history.pushState({}, '', `${this.#workspaceRoute}/${route?.path}`);
|
||||
history.replaceState({}, '', `${this.#workspaceRoute}/${route?.path}`);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user