mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 22:45:14 +00:00
added event listener to focus search box in docs
This commit is contained in:
parent
e3ac994c24
commit
91a71a8550
1 changed files with 8 additions and 0 deletions
|
@ -44,4 +44,12 @@
|
|||
searchBox.addEventListener("input", search);
|
||||
|
||||
search();
|
||||
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.code === 'F3' || ((e.ctrlKey || e.metaKey) && e.code === 'KeyF')) {
|
||||
e.preventDefault();
|
||||
searchBox.focus();
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue