fix: page reload on editor close to clear ONLYOFFICE in-memory state + auto-return to Templates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user