From 27686a5900a31437e843e101c4e9a80d3c0d1035 Mon Sep 17 00:00:00 2001 From: Anthony Kinsey Date: Mon, 8 Nov 2021 10:50:15 -1000 Subject: [PATCH] feat: handle quoting multiple posts, focus after quoting --- src/components/layout/Editor.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/layout/Editor.vue b/src/components/layout/Editor.vue index ac7f4e53..07907dfa 100644 --- a/src/components/layout/Editor.vue +++ b/src/components/layout/Editor.vue @@ -324,7 +324,9 @@ export default { }) watch(() => props.quote, p => { - if (p) nextTick(() => v.posting.post = { title: 'RE:' + props.thread, body: p.body, thread_id: props.thread.id}) + if (p && v.posting?.post?.body) nextTick(() => v.posting.post = { title: 'RE:' + props.thread, body: v.posting.post.body + p.body, thread_id: props.thread.id}) + else if (p) nextTick(() => v.posting.post = { title: 'RE:' + props.thread, body: p.body, thread_id: props.thread.id}) + nextTick(() => v.postEditorEl.focus()) }) // invalidate poll when closing poll creator