Use location.replace when the standalone page editor saves and closes

Avoids leaving the /_/admin shell in the browser history stack.
This commit is contained in:
2026-08-16 19:10:52 +00:00
parent a8cf5a6a82
commit 840f15ee59
+3 -1
View File
@@ -87,7 +87,9 @@ function save() {
async function saveAndClose() {
await save()
// Reload so nav/sidebar changes apply, then the editor is gone.
if (props.standalone) location.href = `/${path.value}`
// In standalone mode replace the current history entry so the admin
// shell does not remain in the back-button stack.
if (props.standalone) location.replace(`/${path.value}`)
else { dirty = false; emit('close'); location.reload() }
}