From 860f62c79264c46841a4d9f723da91c31d574a15 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sat, 30 Sep 2017 09:17:34 -0700 Subject: [PATCH] Have home key go to actual first message in the list. Before this, the home key would go to the first message in our render window. Now we go to the first message in our local list of messages. (Note that there may still be older messages, so it will still often take multiple uses of the home key to truly get to the top of your feed.) --- static/js/navigate.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/navigate.js b/static/js/navigate.js index 4da66bce6c..7c6383584c 100644 --- a/static/js/navigate.js +++ b/static/js/navigate.js @@ -38,10 +38,9 @@ exports.down = function (with_centering) { exports.to_home = function () { message_viewport.last_movement_direction = -1; - var next_row = rows.first_visible(current_msg_list.selected_row()); - if (next_row.length !== 0) { - go_to_row(next_row); - } + var first_id = current_msg_list.first().id; + current_msg_list.select_id(first_id, {then_scroll: true, + from_scroll: true}); }; exports.to_end = function () {