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.
1 parent 6cb364c commit 76bd5b3Copy full SHA for 76bd5b3
src/librustdoc/html/static/main.js
@@ -1579,6 +1579,9 @@ function defocusSearchBar() {
1579
var search = getSearchElement();
1580
if (results.others.length === 1
1581
&& getCurrentValue("rustdoc-go-to-only-result") === "true"
1582
+ // By default, the search DOM element is "empty" (meaning it has no children not
1583
+ // text content). Once a search has been run, it won't be empty, even if you press
1584
+ // ESC or empty the search input (which also "cancels" the search).
1585
&& (!search.firstChild || search.firstChild.innerText !== getSearchLoadingText()))
1586
{
1587
var elem = document.createElement("a");
0 commit comments