mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
resize: Remove height adjustment for padding that no longer exists.
There used to be 5px bottom padding, now removed as part of #31177. Looking now, both the compose textarea and preview div have 5px of margin and no bottom margin and no padding, so we don't need to account for that in height calculations. This isn't causing bugs on main, but once we change how preview height is adjusted, to better support image previews, it would cause a bug where the preview is 10px taller. More discussion here: https://chat.zulip.org/#narrow/channel/9-issues/topic/compose.20preview.20image.20bugs/near/2011708
This commit is contained in:
@@ -103,14 +103,10 @@ export function reset_compose_message_max_height(bottom_whitespace_height?: numb
|
||||
// We ensure that the last message is not overlapped by compose box.
|
||||
$("textarea#compose-textarea").css(
|
||||
"max-height",
|
||||
// Because <textarea> max-height includes padding, we subtract
|
||||
// 10 for the padding.
|
||||
bottom_whitespace_height - compose_non_textarea_height - 10,
|
||||
bottom_whitespace_height - compose_non_textarea_height,
|
||||
);
|
||||
$("#preview_message_area").css(
|
||||
"max-height",
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user