mirror of https://github.com/zulip/zulip.git
Fix hitting down-arrow at bottom of message list.
Previously the viewport.scrollTop() command that we ran in this case would actually scroll far off the bottom of the site; it only did something that looked reasonable because bottom_whitespace was small and thus the scroll was truncated. This version scrolls to 10% of the viewport away from the top. We may need to tweak that to instead be a fixed number of pixels or something. (imported from commit 0176bf6e3662dfa24887f41b110b429bd8054cb0)
This commit is contained in:
parent
0e8c55395c
commit
54c32992fd
|
@ -199,7 +199,8 @@ function process_hotkey(e) {
|
|||
//
|
||||
// FIXME: this doesn't work for End because rows.last_visible()
|
||||
// always returns a message.
|
||||
viewport.scrollTop($("#main_div").outerHeight(true));
|
||||
var current_msg_table = rows.get_table(current_msg_list.table_name);
|
||||
viewport.scrollTop(current_msg_table.outerHeight(true) - viewport.height() * 0.1);
|
||||
mark_current_list_as_read();
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue