support up button from first result

This commit is contained in:
Sam 2017-08-17 13:32:30 -04:00
parent 889b99552a
commit 9246bc3400
1 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,8 @@ export default createWidget('search-menu', {
if (index === -1 && down) {
$('header .panel-body .search-link:first').focus();
} else if (index === 0 && up) {
$('header .panel-body input:first').focus();
} else if (index > -1) {
index += (down ? 1 : -1);
if (index >= 0 && index < results.length) {