Skip to content

Commit b7e09ce

Browse files
mu001999GuillaumeGomez
authored andcommitted
Support typing '/' to search
1 parent f6eaee8 commit b7e09ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

static/keyboard.js

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
switch (getKey(ev)) {
103103
case "s":
104104
case "S":
105+
case "/":
105106
ev.preventDefault();
106107
focusSearchInput();
107108
break;

templates/core/home.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 class="brand">{{ "cubes" | fas }} Docs.rs</h1>
1313
<form action="/releases/search" method="GET" class="landing-search-form">
1414
<div>
1515
<input class="search-input" id="search" name="query" type="text" aria-label="Find crate by search query"
16-
placeholder="Click or press 'S' to search" autofocus>
16+
placeholder="Type 'S' or '/' to search" autofocus>
1717
</div>
1818

1919
<div class="buttons">

0 commit comments

Comments
 (0)