Skip to content

Commit eb2bb99

Browse files
committed
GH-66816: Process before enabling search
1 parent 7ee5155 commit eb2bb99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustdoc/html/static/main.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -2739,14 +2739,17 @@ function defocusSearchBar() {
27392739
});
27402740
}
27412741

2742-
window.addSearchOptions = function(crates) {
2742+
function enableSearchInput() {
27432743
if (search_input) {
27442744
search_input.removeAttribute('disabled');
27452745
}
2746+
}
27462747

2748+
window.addSearchOptions = function(crates) {
27472749
var elem = document.getElementById("crate-search");
27482750

27492751
if (!elem) {
2752+
enableSearchInput();
27502753
return;
27512754
}
27522755
var crates_text = [];
@@ -2784,7 +2787,7 @@ function defocusSearchBar() {
27842787
elem.value = savedCrate;
27852788
}
27862789
}
2787-
2790+
enableSearchInput();
27882791
};
27892792

27902793
function buildHelperPopup() {

0 commit comments

Comments
 (0)