mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
compose: Fix compose box initialization order.
This effectively reverts part of
70d444a8eb. While it's correct that we
want to render this bit of Handlebars template early, it was not
correct to move all compose box initialization earlier.
Do the same thing we do with the left/right sidebar container
templates, which is to render them directly in `ui_init.js`.
Fixes #20778.
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import $ from "jquery";
|
||||
import _ from "lodash";
|
||||
|
||||
import render_compose from "../templates/compose.hbs";
|
||||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import * as common from "./common";
|
||||
import * as compose_actions from "./compose_actions";
|
||||
import * as compose_error from "./compose_error";
|
||||
import * as compose_fade from "./compose_fade";
|
||||
@@ -14,7 +11,6 @@ import * as compose_ui from "./compose_ui";
|
||||
import * as compose_validate from "./compose_validate";
|
||||
import * as echo from "./echo";
|
||||
import * as flatpickr from "./flatpickr";
|
||||
import * as giphy from "./giphy";
|
||||
import {$t, $t_html} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as markdown from "./markdown";
|
||||
@@ -387,21 +383,7 @@ export function render_and_show_preview(preview_spinner, preview_content_box, co
|
||||
}
|
||||
}
|
||||
|
||||
export function render_compose_box() {
|
||||
$("#compose-container").append(
|
||||
render_compose({
|
||||
embedded: $("#compose").attr("data-embedded") === "",
|
||||
file_upload_enabled: page_params.max_file_upload_size_mib > 0,
|
||||
giphy_enabled: giphy.is_giphy_enabled(),
|
||||
}),
|
||||
);
|
||||
$(`.enter_sends_${user_settings.enter_sends}`).show();
|
||||
common.adjust_mac_shortcuts(".enter_sends kbd");
|
||||
}
|
||||
|
||||
export function initialize() {
|
||||
render_compose_box();
|
||||
|
||||
$("#below-compose-content .video_link").toggle(compute_show_video_chat_button());
|
||||
$(
|
||||
"#stream_message_recipient_stream,#stream_message_recipient_topic,#private_message_recipient",
|
||||
|
||||
Reference in New Issue
Block a user