From 13383982bce4a2db54585ee2cac93f8b91941094 Mon Sep 17 00:00:00 2001 From: novenary Date: Mon, 16 Sep 2024 22:40:33 +0300 Subject: [PATCH] post_status_form: enable sync flush for watcher This fixes drafts not clearing after posting a reply. Vue 3.3.11 changed watchers to stop firing after component unmount. After posting a reply, the post form is removed, now causing the queued event to be discarded. Synchronous flush causes the handler to be called immediately when changes happen, solving the problem. See: https://github.com/vuejs/core/pull/7181 See: https://github.com/vuejs/docs/commit/80e2128d52603856a26a8bb7258606cfe80561e9 Fixes: a7dea2f70f2beba781068a7ff7d8a2a9ef8a9478 Fixes: #413 --- src/components/post_status_form/post_status_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6eee23ce..0c77199b 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -329,6 +329,7 @@ const PostStatusForm = { watch: { 'newStatus': { deep: true, + flush: 'sync', handler () { this.statusChanged() } -- 2.34.1