diff --git a/zephyr/static/js/hotkey.js b/zephyr/static/js/hotkey.js index 7ffe3405d8..3fa4bbcb9e 100644 --- a/zephyr/static/js/hotkey.js +++ b/zephyr/static/js/hotkey.js @@ -195,10 +195,6 @@ function process_hotkey(e) { return false; } - if (event_name === 'end') { - navigate.to_end(); - return true; - } switch (event_name) { case 'message_actions': @@ -217,12 +213,6 @@ function process_hotkey(e) { switch (event_name) { - case 'page_up': - navigate.page_up(); - return true; - case 'page_down': - navigate.page_down(); - return true; case 'escape': // Esc: close actions popup, cancel compose, clear a find, or un-narrow if (popovers.any_active()) { popovers.hide_all(); @@ -273,6 +263,15 @@ function process_hotkey(e) { case 'home': navigate.to_home(); return true; + case 'end': + navigate.to_end(); + return true; + case 'page_up': + navigate.page_up(); + return true; + case 'page_down': + navigate.page_down(); + return true; } return false; diff --git a/zephyr/static/js/navigate.js b/zephyr/static/js/navigate.js index d734a0dfae..77c59e8c83 100644 --- a/zephyr/static/js/navigate.js +++ b/zephyr/static/js/navigate.js @@ -44,9 +44,6 @@ exports.to_home = function () { }; exports.to_end = function () { - if (current_msg_list.empty()) { - return false; - } var next_id = current_msg_list.last().id; last_viewport_movement_direction = 1; current_msg_list.select_id(next_id, {then_scroll: true,