Rollup merge of #47134 - Sogomn:master, r=QuietMisdreavus
Defocus search bar in rustdoc pages rust-lang/rfcs#2265
This commit is contained in:
commit
08501bd983
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user