mirror of https://github.com/zulip/zulip.git
compose: Fix the calculation of the compose box's max height.
This is a follow up to #30396, to remove consideration of the text box's margin after it's removal in #29953.
This commit is contained in:
parent
085ee219eb
commit
fa2f86ff80
|
@ -110,18 +110,17 @@ export function reset_compose_message_max_height(bottom_whitespace_height?: numb
|
|||
const compose_non_textarea_height = compose_height - compose_textarea_height;
|
||||
|
||||
// We ensure that the last message is not overlapped by compose box.
|
||||
// TODO: Remove subtraction of 2 when we remove the margin in #29953
|
||||
$("textarea#compose-textarea").css(
|
||||
"max-height",
|
||||
// Because <textarea> max-height includes padding, we subtract
|
||||
// 10 for the padding and 2 for the margin.
|
||||
bottom_whitespace_height - compose_non_textarea_height - 2 - 10,
|
||||
// 10 for the padding.
|
||||
bottom_whitespace_height - compose_non_textarea_height - 10,
|
||||
);
|
||||
$("#preview_message_area").css(
|
||||
"max-height",
|
||||
// Because <div> max-height doesn't include padding, we subtract
|
||||
// 2 for the margin.
|
||||
bottom_whitespace_height - compose_non_textarea_height - 2,
|
||||
// Because <div> max-height doesn't include padding, we do not
|
||||
// subtract anything.
|
||||
bottom_whitespace_height - compose_non_textarea_height,
|
||||
);
|
||||
$("#scroll-to-bottom-button-container").css("bottom", compose_height);
|
||||
compose_ui.autosize_textarea($("#compose-textarea"));
|
||||
|
|
Loading…
Reference in New Issue