From a282f7b32bdfe855d76725148dffb67572ca9e3c Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Fri, 5 Oct 2012 15:51:47 -0400 Subject: [PATCH] Have PageDown at the bottom/PageUp at the top select the last/first zephyr. As opposed to inching towards it message by message. (imported from commit 31e833dd06bf27336d9b1f293ab992e99537bc21) --- zephyr/static/js/hotkey.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zephyr/static/js/hotkey.js b/zephyr/static/js/hotkey.js index ad24a5ea26..183d7bd2d7 100644 --- a/zephyr/static/js/hotkey.js +++ b/zephyr/static/js/hotkey.js @@ -53,9 +53,15 @@ function process_hotkey(code) { switch (code) { case 33: // Page Up keep_pointer_in_view(); + if (at_top_of_viewport()) { + select_zephyr(get_first_visible(), false); + } return false; // We want the browser to actually page up and down case 34: // Page Down keep_pointer_in_view(); + if (at_bottom_of_viewport()) { + select_zephyr(get_last_visible(), false); + } return false; case 27: // Esc: hide compose pane hide_compose();