Skip to content

Commit 27686a5

Browse files
committed
feat: handle quoting multiple posts, focus after quoting
1 parent 382f37c commit 27686a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/layout/Editor.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ export default {
324324
})
325325
326326
watch(() => props.quote, p => {
327-
if (p) nextTick(() => v.posting.post = { title: 'RE:' + props.thread, body: p.body, thread_id: props.thread.id})
327+
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})
328+
else if (p) nextTick(() => v.posting.post = { title: 'RE:' + props.thread, body: p.body, thread_id: props.thread.id})
329+
nextTick(() => v.postEditorEl.focus())
328330
})
329331
330332
// invalidate poll when closing poll creator

0 commit comments

Comments
 (0)