forked from server/soundboard
bugfix for searchfield reset using ESC key
This commit is contained in:
parent
c9eff2d77d
commit
e6107bdfe3
@ -110,12 +110,13 @@ function addKeyListeners() {
|
|||||||
function resetSearch() {
|
function resetSearch() {
|
||||||
var searchfield = document.querySelector("#search");
|
var searchfield = document.querySelector("#search");
|
||||||
var buttons = document.querySelectorAll(".sound");
|
var buttons = document.querySelectorAll(".sound");
|
||||||
|
searchfield.blur();
|
||||||
|
searchfield.value = "";
|
||||||
|
|
||||||
buttons.forEach(function(item) {
|
buttons.forEach(function(item) {
|
||||||
item.style.display = "inline-block";
|
item.style.display = "inline-block";
|
||||||
});
|
});
|
||||||
|
|
||||||
searchfield.value = "";
|
|
||||||
searchfield.focus();
|
searchfield.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user