diff --git a/wwwroot/js/ui.js b/wwwroot/js/ui.js index a7c42da..76f76f6 100644 --- a/wwwroot/js/ui.js +++ b/wwwroot/js/ui.js @@ -52,7 +52,12 @@ function _addMarkButton(div, messageId, isMarked) { console.error('Mark toggle failed:', err); } }); - div.appendChild(btn); + const replyBtn = div.querySelector('.msg-reply-btn'); + if (replyBtn) { + replyBtn.after(btn); + } else { + div.prepend(btn); + } } // ── Reply Button ──