css: Scroll on html instead of .app.

This commit is contained in:
Aman Agrawal
2023-05-20 20:00:21 +05:30
committed by Tim Abbott
parent cae02dbca4
commit a78dc4a2bd
23 changed files with 80 additions and 108 deletions

View File

@@ -128,7 +128,8 @@ export function maybe_scroll_up_selected_message() {
return;
}
const cover = $selected_row.offset().top + $selected_row.height() - $("#compose").offset().top;
const cover =
$selected_row.get_offset_to_window().bottom - $("#compose").get_offset_to_window().top;
if (cover > 0) {
message_viewport.user_initiated_animate_scroll(cover + 20);
}