Fixing bug with search box

This commit is contained in:
fabioswartz 2016-12-29 06:17:29 +00:00
parent bf6f2d816a
commit c2a382f6a0
2 changed files with 8 additions and 1 deletions

View File

@ -674,6 +674,7 @@ header p i {
#search i {
margin-right: 0.3em;
color: rgba(255, 255, 255, .5);
user-select: none;
}
#search input {

View File

@ -582,6 +582,12 @@ document.addEventListener('listing', event => {
document.querySelector('#search > div div').innerHTML = "Search or use one of your supported commands: " + user.Commands.join(", ") + ".";
document.querySelector('#search input').addEventListener('keyup', searchEvent);
document.querySelector("#search").addEventListener("click", event => {
if(event.target.classList.contains("active") || event.target.classList.contains("material-icons")) return;
event.target.classList.add("active");
document.querySelector("#search input").focus();
});
}
if (user.AllowEdit) {