Rollup merge of #47134 - Sogomn:master, r=QuietMisdreavus

Defocus search bar in rustdoc pages

rust-lang/rfcs#2265
This commit is contained in:
kennytm 2018-01-03 16:58:03 +08:00 committed by GitHub
commit 08501bd983

View File

@ -258,6 +258,7 @@
addClass(search, "hidden");
removeClass(document.getElementById("main"), "hidden");
}
defocusSearchBar();
break;
case "s":
@ -1884,3 +1885,8 @@
function focusSearchBar() {
document.getElementsByClassName('search-input')[0].focus();
}
// Removes the focus from the search bar
function defocusSearchBar() {
document.getElementsByClassName('search-input')[0].blur();
}