hotkeys: Move cursor to Filter streams input if at top of Streams menu.

Fixes #4227
This commit is contained in:
Cynthia Lin 2017-03-22 22:15:47 -07:00 committed by Tim Abbott
parent b800cb05c0
commit a027e9318d
1 changed files with 6 additions and 0 deletions

View File

@ -739,6 +739,10 @@ exports.switch_rows = function (event) {
switch_row = active_data[0].prev();
} else if (event === 'down_arrow') {
switch_row = active_data[0].next();
if ($('#search_stream_name').is(":focus")) {
$('#search_stream_name').blur();
return;
}
}
var row_data = get_row_data(switch_row);
@ -746,6 +750,8 @@ exports.switch_rows = function (event) {
var switch_row_name = row_data[1].name;
var hash = ['#streams', row_data[0], switch_row_name];
export_hash(hash);
} else if (event === 'up_arrow' && !row_data) {
$('#search_stream_name').focus();
}
};