diff --git a/frontend_tests/node_tests/hotkey.js b/frontend_tests/node_tests/hotkey.js index db17d3a83c..41e38945ea 100644 --- a/frontend_tests/node_tests/hotkey.js +++ b/frontend_tests/node_tests/hotkey.js @@ -293,8 +293,8 @@ function stubbing(func_name_to_stub, test_function) { hotkey.is_subs = return_true; global.ui_state.home_tab_obscured = return_true; - assert_mapping('up_arrow', 'subs.arrow_keys'); - assert_mapping('down_arrow', 'subs.arrow_keys'); + assert_mapping('up_arrow', 'subs.switch_rows'); + assert_mapping('down_arrow', 'subs.switch_rows'); global.ui_state.home_tab_obscured = return_false; hotkey.is_settings_page = return_true; diff --git a/static/js/hotkey.js b/static/js/hotkey.js index fbf8dfe051..fa60537ac0 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -435,7 +435,7 @@ exports.process_hotkey = function (e, hotkey) { if (hotkey.message_view_only && ui_state.home_tab_obscured()) { // if up/down arrow key was pressed and streams menu is open if ((event_name === 'up_arrow' || event_name === 'down_arrow') && exports.is_subs()) { - subs.arrow_keys(event_name); + subs.switch_rows(event_name); return true; } return false; diff --git a/static/js/subs.js b/static/js/subs.js index 7b34c3ac25..1d44c783e4 100644 --- a/static/js/subs.js +++ b/static/js/subs.js @@ -707,7 +707,7 @@ exports.close = function () { subs.remove_miscategorized_streams(); }; -exports.arrow_keys = function (event) { +exports.switch_rows = function (event) { var active_row = $('div.stream-row.active'); // current active row var switch_row; // initialize var for row that we're switching to // if rows have undefined attributes (no selected/active row)