Don't move cursor in search box when using arrows to navigate search results
This commit is contained in:
parent
f3fadf6abd
commit
e85df08bde
1 changed files with 2 additions and 0 deletions
|
@ -1396,6 +1396,7 @@ function defocusSearchBar() {
|
|||
|
||||
addClass(actives[currentTab][0].previousElementSibling, "highlighted");
|
||||
removeClass(actives[currentTab][0], "highlighted");
|
||||
e.preventDefault();
|
||||
} else if (e.which === 40) { // down
|
||||
if (!actives[currentTab].length) {
|
||||
var results = document.getElementById("results").childNodes;
|
||||
|
@ -1409,6 +1410,7 @@ function defocusSearchBar() {
|
|||
addClass(actives[currentTab][0].nextElementSibling, "highlighted");
|
||||
removeClass(actives[currentTab][0], "highlighted");
|
||||
}
|
||||
e.preventDefault();
|
||||
} else if (e.which === 13) { // return
|
||||
if (actives[currentTab].length) {
|
||||
document.location.href =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue