From 2c131e5bd6a888106eac64c0f5b8da69e7bdd193 Mon Sep 17 00:00:00 2001 From: znerol Date: Sat, 16 May 2026 16:33:30 +0200 Subject: [PATCH] fix: Unlock form when leaving the editor --- src/mixins/ViewsMixin.js | 9 +++++++++ src/views/Create.vue | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/mixins/ViewsMixin.js b/src/mixins/ViewsMixin.js index 87e78e020..fb2894550 100644 --- a/src/mixins/ViewsMixin.js +++ b/src/mixins/ViewsMixin.js @@ -181,5 +181,14 @@ export default { showError(t('forms', 'Error while saving form')) } }, + + /** + * Attempt to unlock the form. + */ + async tryFormUnlock() { + this.form.lockedUntil = null + await this.saveFormProperty('lockedUntil') + }, + }, } diff --git a/src/views/Create.vue b/src/views/Create.vue index 454890746..b5c067780 100644 --- a/src/views/Create.vue +++ b/src/views/Create.vue @@ -404,6 +404,10 @@ export default { SetWindowTitle(this.formTitle) }, + async unmounted() { + await this.tryFormUnlock() + }, + methods: { setQuestionRef(el) { if (el) {