diff --git a/remarkbox/static/js/custom.js b/remarkbox/static/js/custom.js index ba7573e..883bfe4 100644 --- a/remarkbox/static/js/custom.js +++ b/remarkbox/static/js/custom.js @@ -271,49 +271,49 @@ function initAjaxCommentForms() { } function insertReply(data, form) { - // Build a new node div matching the existing markup structure. - var nodeDiv = document.createElement('div'); - nodeDiv.id = 'node-' + data.id; - nodeDiv.className = 'node'; + // Insert server-rendered node HTML into the correct position. + var parentNodeDiv = form.closest('.node'); - var authorSpan = ''; - - var contentDiv = '