Fix search bar defocus
This commit is contained in:
@@ -1132,6 +1132,10 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} else if (e.which === 16) { // shift
|
} else if (e.which === 16) { // shift
|
||||||
// Does nothing, it's just to avoid losing "focus" on the highlighted element.
|
// Does nothing, it's just to avoid losing "focus" on the highlighted element.
|
||||||
|
} else if (e.which === 27) { // escape
|
||||||
|
removeClass(actives[currentTab][0], 'highlighted');
|
||||||
|
document.getElementsByClassName('search-input')[0].value = '';
|
||||||
|
defocusSearchBar();
|
||||||
} else if (actives[currentTab].length > 0) {
|
} else if (actives[currentTab].length > 0) {
|
||||||
removeClass(actives[currentTab][0], 'highlighted');
|
removeClass(actives[currentTab][0], 'highlighted');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user