From 4ad78ade6876319e797a4e5bc1c4144bf50d67dc Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 2 Aug 2013 13:33:20 -0400 Subject: [PATCH] Don't widen bottom whitespace on down-arrow. We had a feature that if you hit the down arrow key when you were at the last message, it would recenter you. Waseem has bought into temporarily removing this feature. Justifications: 1) We can always put it back. 2) Autoscrolling makes it less relevant. 3) The feature complicated the code a bit. 4) The feature worked different for End than down arrow, due to a FIXME. 5) It might have been a misfeature for users that want more control over their own scrolling. 6) You can achieve the same essential effect by using PgDn or space. (imported from commit fa6874bb5d29d7057bb1601f0b6d577bac1272c7) --- static/js/navigate.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/static/js/navigate.js b/static/js/navigate.js index 77c59e8c83..007b2b713a 100644 --- a/static/js/navigate.js +++ b/static/js/navigate.js @@ -23,16 +23,6 @@ exports.down = function () { if (next_row.length !== 0) { go_to_row(next_row); } - if ((next_row.length === 0)) { - // At the last message, scroll to the bottom so we have - // lots of nice whitespace for new messages coming in. - // - // FIXME: this doesn't work for End because rows.last_visible() - // always returns a message. - 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(); - } }; exports.to_home = function () { @@ -71,4 +61,4 @@ exports.page_down = function () { }; return exports; -}()); \ No newline at end of file +}());