mirror of https://github.com/zulip/zulip.git
Make extra room when you press down on the last message.
This essentially reverts commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a, though also adds support for this behavior with the 'j' key. (imported from commit 36c51e0f6bd03c53b84abddc75097cb06fc04e16)
This commit is contained in:
parent
367feda747
commit
56bb7ae614
|
@ -38,6 +38,15 @@ function process_hotkey(code) {
|
|||
if (next_zephyr.length !== 0) {
|
||||
select_zephyr(next_zephyr, true);
|
||||
}
|
||||
if ((next_zephyr.length === 0) && (code === 40 || code === 106)) {
|
||||
// At the last zephyr, scroll to the bottom so we have
|
||||
// lots of nice whitespace for new zephyrs coming in.
|
||||
//
|
||||
// FIXME: this doesn't work for End because get_last_visible()
|
||||
// always returns a zephyr.
|
||||
var viewport = $(window);
|
||||
viewport.scrollTop($("#main_div").outerHeight(true));
|
||||
}
|
||||
return process_hotkey;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue