Skip to content

Commit 1f4b605

Browse files
committed
fix(DirectEditing): save before closing the editor
Before, we used the Vue 2 `$destroy()` function that called the Vue component teardown cycle - which called save and then close. Vue 3 removed that method. The former fix to call `close()` here was partial, as it closed the editor without saving first. So let's `save()` explicitely here as well. Signed-off-by: Jonas <jonas@freesources.org>
1 parent c72a8d0 commit 1f4b605

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/views/DirectEditing.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export default {
128128
async close() {
129129
this.saving = true
130130
setTimeout(async () => {
131+
await this.$refs.editor.save?.()
131132
await this.$refs.editor.close?.()
132133
callMobileMessage('close')
133134
}, 0)

0 commit comments

Comments
 (0)