1
Fork 0

Don't move cursor in search box when using arrows to navigate search results

This commit is contained in:
Carol (Nichols || Goulding) 2020-06-01 22:21:39 -04:00
parent f3fadf6abd
commit e85df08bde
No known key found for this signature in database
GPG key ID: D04B39A6CA243902

View file

@ -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 =