From e7746e97e8467ea23c5717051dade0389e15833b Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 23 Oct 2012 16:19:28 -0400 Subject: [PATCH] select_message: Fall back to the last, not first, message This seems more likely to be what people want when e.g. viewing all huddles. Later we can get more clever and select the nearest huddle, or something. (imported from commit 8ec1aa02c050dd25eb868b1e317d114743525c7b) --- zephyr/static/js/zephyr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 8f59b31032..0b6c26e059 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -240,9 +240,9 @@ function select_message(next_message, opts) { next_message = rows.next_visible(next_message); } - /* Fall back to the first visible message. */ + /* Fall back to the last visible message. */ if (next_message.length === 0) { - next_message = rows.first_visible(); + next_message = rows.last_visible(); if (next_message.length === 0) { // There are no messages! return false;