Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Set a min-height before showing preview area.

evykassirerc4542df0d7f9
diff --git a/web/src/compose.js b/web/src/compose.js
index a35534992c1..7e5ff474b7b 100644
--- a/web/src/compose.js
+++ b/web/src/compose.js
@@ -71,6 +71,8 @@ export function show_preview_area() {
$("#compose .preview_content"),
content,
);
+ const edit_height = $compose_textarea.height();
+ $preview_message_area.css({"min-height": edit_height + "px"});
$preview_message_area.show();
}
diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts
index 2ad8791cab7..79b2ed63c4f 100644
--- a/web/src/message_edit.ts
+++ b/web/src/message_edit.ts
@@ -1665,6 +1665,8 @@ export function show_preview_area($element: JQuery): void {
$row.find(".preview_content"),
content,
);
+ const edit_height = $msg_edit_content.height();
+ $preview_message_area.css({"min-height": edit_height + "px"});
$preview_message_area.show();
}