diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 15f9f23a7c..5366103bf2 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -686,8 +686,7 @@ export function initialize() { popovers.hide_all(); } - $("body").on("click", "#compose_buttons", handle_compose_click); - $("body").on("click", ".compose-content", handle_compose_click); + $("body").on("click", "#compose-content", handle_compose_click); $("body").on("click", "#compose_close", () => { compose_actions.cancel(); diff --git a/static/js/compose.js b/static/js/compose.js index ad8e5e4851..3b5f5b1921 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -1091,10 +1091,9 @@ export function warn_if_mentioning_unsubscribed_user(mentioned) { } export function render_compose_box() { - const $compose = $("#compose"); - $compose.append( + $("#compose-container").append( render_compose({ - embedded: $compose.attr("data-embedded") === "", + embedded: $("#compose").attr("data-embedded") === "", file_upload_enabled: page_params.max_file_upload_size_mib > 0, giphy_enabled: giphy.is_giphy_enabled(), }), diff --git a/static/js/scroll_bar.js b/static/js/scroll_bar.js index fc0c2660d7..2031fa3b5d 100644 --- a/static/js/scroll_bar.js +++ b/static/js/scroll_bar.js @@ -59,13 +59,13 @@ export function initialize() { }); $("#compose").css("left", "-" + sbWidth + "px"); - $(".compose-content").css({left: sbWidth + "px", "margin-right": 7 + sbWidth + "px"}); + $("#compose-content").css({left: sbWidth + "px", "margin-right": 7 + sbWidth + "px"}); $("#keyboard-icon").css({"margin-right": sbWidth + "px"}); $("head").append( "