Fixing bug with search box

Former-commit-id: c2a382f6a0
pull/726/head
fabioswartz 2016-12-29 06:17:29 +00:00
parent 3dcc5c4a21
commit 72e3da2e1e
2 changed files with 8 additions and 1 deletions

View File

@ -674,6 +674,7 @@ header p i {
#search i { #search i {
margin-right: 0.3em; margin-right: 0.3em;
color: rgba(255, 255, 255, .5); color: rgba(255, 255, 255, .5);
user-select: none;
} }
#search input { #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 > div div').innerHTML = "Search or use one of your supported commands: " + user.Commands.join(", ") + ".";
document.querySelector('#search input').addEventListener('keyup', searchEvent); 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) { if (user.AllowEdit) {