Skip to content

Commit ef3127d

Browse files
Completely remove search query parameter when clearing search input
1 parent 72c7b70 commit ef3127d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,8 @@ function defocusSearchBar() {
19251925
clearInputTimeout();
19261926
if (search_input.value.length === 0) {
19271927
if (browserSupportsHistoryApi()) {
1928-
history.replaceState("", window.currentCrate + " - Rust", "?search=");
1928+
history.replaceState("", window.currentCrate + " - Rust",
1929+
window.location.href.split("?")[0]);
19291930
}
19301931
hideSearchResults();
19311932
} else {

0 commit comments

Comments
 (0)