We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
autofocus
1 parent b3410ae commit a10328fCopy full SHA for a10328f
src/librustdoc/html/static/js/main.js
@@ -253,10 +253,13 @@ function preLoadCss(cssUrl) {
253
const out = nonnull(nonnull(window.searchState.outputElement()).parentElement);
254
const hdr = document.createElement("div");
255
hdr.className = "main-heading search-results-main-heading";
256
+ const params = searchState.getQueryStringParams();
257
+ const autofocusParam = params.search === "" ? "autofocus" : "";
258
hdr.innerHTML = `<nav class="sub">
259
<form class="search-form">
260
<span></span> <!-- This empty span is a hacky fix for Safari: see #93184 -->
261
<input
262
+ ${autofocusParam}
263
class="search-input"
264
name="search"
265
aria-label="Run search in the documentation"
0 commit comments