mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
compose: Update max-height when compose banner is displayed.
Othwersie, compose banner will overlap with any breadcrumbs we have below the last message when user is fully scrolled up and compose is at max-height.
This commit is contained in:
@@ -451,12 +451,10 @@ export function initialize() {
|
||||
|
||||
resize.watch_manual_resize("#compose-textarea");
|
||||
|
||||
// Update position of scroll to bottom button based on
|
||||
// height of the compose box.
|
||||
const update_scroll_to_bottom_position = new ResizeObserver(() => {
|
||||
$("#scroll-to-bottom-button-container").css("bottom", $("#compose").outerHeight());
|
||||
});
|
||||
update_scroll_to_bottom_position.observe(document.querySelector("#compose"));
|
||||
// Updates compose max-height and scroll to bottom button position when
|
||||
// there is a change in compose height like when a compose banner is displayed.
|
||||
const update_compose_max_height = new ResizeObserver(resize.reset_compose_message_max_height);
|
||||
update_compose_max_height.observe(document.querySelector("#compose"));
|
||||
|
||||
upload.feature_check($("#compose .compose_upload_file"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user