|
|
|
@ -89,7 +89,8 @@ define('admin/modules/search', ['mousetrap'], function (mousetrap) {
|
|
|
|
|
mousetrap(input[0]).bind(['up', 'down'], function (ev, key) {
|
|
|
|
|
var next;
|
|
|
|
|
if (key === 'up') {
|
|
|
|
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().prev('.result').children();
|
|
|
|
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().prev('.result')
|
|
|
|
|
.children();
|
|
|
|
|
if (!next.length) {
|
|
|
|
|
next = menu.find('li.result > a').last();
|
|
|
|
|
}
|
|
|
|
@ -98,7 +99,8 @@ define('admin/modules/search', ['mousetrap'], function (mousetrap) {
|
|
|
|
|
next[0].scrollIntoView(true);
|
|
|
|
|
}
|
|
|
|
|
} else if (key === 'down') {
|
|
|
|
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().next('.result').children();
|
|
|
|
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().next('.result')
|
|
|
|
|
.children();
|
|
|
|
|
if (!next.length) {
|
|
|
|
|
next = menu.find('li.result > a').first();
|
|
|
|
|
}
|
|
|
|
|