From: Art Cancro Date: Mon, 13 Dec 2021 20:18:54 +0000 (-0500) Subject: open the reply box with .append() instead of tweaking outerHTML X-Git-Tag: v943~33 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=96877f3404aff55f81a2046b374154518a8d1cf9;p=citadel.git open the reply box with .append() instead of tweaking outerHTML --- diff --git a/webcit-ng/static/js/view_forum.js b/webcit-ng/static/js/view_forum.js index 791976b13..b804702bc 100644 --- a/webcit-ng/static/js/view_forum.js +++ b/webcit-ng/static/js/view_forum.js @@ -209,8 +209,10 @@ function compose_references(references, msgid) { // Open a reply box directly below a specific message function open_reply_box(prefix, msgnum, is_quoted, references, msgid) { - new_div_name = prefix + "reply_to_" + msgnum; - document.getElementById(prefix+msgnum).outerHTML += "
reply box put here
"; + let new_div = document.createElement("div"); + let new_div_name = prefix + "reply_to_" + msgnum; + new_div.id = new_div_name; + document.getElementById(prefix+msgnum).append(new_div); replybox = "
" // begin message wrapper