fix: page reload on editor close to clear ONLYOFFICE in-memory state + auto-return to Templates

This commit is contained in:
root
2026-07-16 12:05:50 +00:00
parent 8b6b083d3d
commit 8b9783060e
5 changed files with 19 additions and 8 deletions

View File

@@ -280,11 +280,12 @@ function closeOnlyofficeEditor() {
onlyofficeEditorInstance = null;
}
closeModal();
// Force a small delay then reload the template list so the
// user sees the updated list with the latest save timestamp
// Reload the page to clear ONLYOFFICE's in-memory state.
// Save the active page so the user returns to Templates automatically
sessionStorage.setItem('returnPage', 'templates');
setTimeout(() => {
loadOnlyofficeTemplates();
}, 500);
location.reload();
}, 300);
}
// Open ONLYOFFICE editor in a modal