Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ function defocusSearchBar() {
return "+";
}
// button will collapse the section
// note that this text is also set in the HTML template in render.rs
// note that this text is also set in the HTML template in ../render/mod.rs
return "\u2212"; // "\u2212" is "−" minus sign
}

Expand Down Expand Up @@ -2851,17 +2851,10 @@ function defocusSearchBar() {
});
}

function enableSearchInput() {
if (search_input) {
search_input.removeAttribute('disabled');
}
}

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

if (!elem) {
enableSearchInput();
return;
}
var savedCrate = getSettingValue("saved-filter-crate");
Expand All @@ -2880,7 +2873,6 @@ function defocusSearchBar() {
elem.value = savedCrate;
}
}
enableSearchInput();
};

function buildHelperPopup() {
Expand Down Expand Up @@ -2972,7 +2964,7 @@ function defocusSearchBar() {
search_input.addEventListener("blur", function() {
search_input.placeholder = search_input.origPlaceholder;
});
enableSearchInput();
search_input.removeAttribute('disabled');

var crateSearchDropDown = document.getElementById("crate-search");
crateSearchDropDown.addEventListener("focus", loadSearch);
Expand Down