mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
message_scroll: Show scroll to bottom button.
Show/hide scroll to bottom button when the last message is not visible in the current scroll position. We adjust the bottom offset of the button based on compose box height. Fixes #19862
This commit is contained in:
@@ -413,6 +413,13 @@ 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"));
|
||||
|
||||
upload.feature_check($("#compose .compose_upload_file"));
|
||||
|
||||
$("#compose-all-everyone").on("click", ".compose-all-everyone-confirm", (event) => {
|
||||
|
||||
Reference in New Issue
Block a user