We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 323fb71 commit eeb5552Copy full SHA for eeb5552
src/librustdoc/html/static/main.js
@@ -101,7 +101,7 @@ function focusSearchBar() {
101
getSearchInput().focus();
102
}
103
104
-// Removes the focus from the search bar
+// Removes the focus from the search bar.
105
function defocusSearchBar() {
106
getSearchInput().blur();
107
@@ -220,6 +220,11 @@ function defocusSearchBar() {
220
addClass(search, "hidden");
221
removeClass(main, "hidden");
222
document.title = titleBeforeSearch;
223
+ // We also remove the query parameter from the URL.
224
+ if (browserSupportsHistoryApi()) {
225
+ history.replaceState("", window.currentCrate + " - Rust",
226
+ getNakedUrl() + window.location.hash);
227
+ }
228
229
230
// used for special search precedence
0 commit comments