Skip to content

Commit

Permalink
rust-langGH-66816: Process before enabling search
Browse files Browse the repository at this point in the history
  • Loading branch information
aszenz committed Aug 29, 2020
1 parent 7ee5155 commit eb2bb99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2739,14 +2739,17 @@ function defocusSearchBar() {
});
}

window.addSearchOptions = function(crates) {
function enableSearchInput() {
if (search_input) {
search_input.removeAttribute('disabled');
}
}

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

if (!elem) {
enableSearchInput();
return;
}
var crates_text = [];
Expand Down Expand Up @@ -2784,7 +2787,7 @@ function defocusSearchBar() {
elem.value = savedCrate;
}
}

enableSearchInput();
};

function buildHelperPopup() {
Expand Down

0 comments on commit eb2bb99

Please sign in to comment.