Skip to content

Commit 6297a30

Browse files
authored
Unrolled build for rust-lang#123355
Rollup merge of rust-lang#123355 - mu001999:rustdoc/search, r=GuillaumeGomez Support type '/' to search Related topic on IRLO: https://internals.rust-lang.org/t/rustdoc-use-key-to-search-instead-of-s/20559
2 parents 1dea922 + 1ca1457 commit 6297a30

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustdoc/html/static/js/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ function preLoadCss(cssUrl) {
462462

463463
case "s":
464464
case "S":
465+
case "/":
465466
ev.preventDefault();
466467
searchState.focus();
467468
break;
@@ -1334,7 +1335,7 @@ function preLoadCss(cssUrl) {
13341335

13351336
const shortcuts = [
13361337
["?", "Show this help dialog"],
1337-
["S", "Focus the search field"],
1338+
["S / /", "Focus the search field"],
13381339
["↑", "Move up in search results"],
13391340
["↓", "Move down in search results"],
13401341
["← / →", "Switch result tab (when results focused)"],

src/librustdoc/html/templates/page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ <h2>Files</h2> {# #}
129129
aria-label="Run search in the documentation" {#+ #}
130130
autocomplete="off" {#+ #}
131131
spellcheck="false" {#+ #}
132-
placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {#+ #}
132+
placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" {#+ #}
133133
type="search"> {# #}
134134
<div id="help-button" tabindex="-1"> {# #}
135135
<a href="{{page.root_path|safe}}help.html" title="help">?</a> {# #}

0 commit comments

Comments
 (0)