pressing "S" on the page body focuses to the search box
This commit is contained in:
parent
5b639ebb82
commit
9051e6d882
|
@ -168,3 +168,13 @@ AddOnLoad(function(){
|
||||||
indicator.innerHTML = label;
|
indicator.innerHTML = label;
|
||||||
indicator.style.display = "block";
|
indicator.style.display = "block";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Pressing "S" focuses on the "...search manuals..." text field
|
||||||
|
AddOnLoad(function(){
|
||||||
|
window.addEventListener("keypress", function(event) {
|
||||||
|
if (event && event.charCode == 115 && event.target == document.body) {
|
||||||
|
var field = document.getElementsByClassName("searchbox")[0];
|
||||||
|
field.focus();
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user