fix scrolling while clicking up and down on search results
This commit is contained in:
parent
7ca5ab3da3
commit
4714d31c01
|
@ -19,11 +19,17 @@ Discourse.SearchView = Discourse.View.extend({
|
||||||
if ($('#search-dropdown').is(':visible')) {
|
if ($('#search-dropdown').is(':visible')) {
|
||||||
switch (e.which) {
|
switch (e.which) {
|
||||||
case 13:
|
case 13:
|
||||||
return controller.select();
|
controller.select();
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
return controller.moveUp();
|
controller.moveUp();
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
return controller.moveDown();
|
controller.moveDown();
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue