Rollup merge of #76052 - aszenz:GH-66816_removes_disable_attribute_before_return, r=GuillaumeGomez

GH-66816:  Remove disable attr before return

Passing --disable-per-crate-search removes the create search inputs so moved code around so that the search input is enabled
first before the function returns.

Fixes #66816
This commit is contained in:
Aleksey Kladov 2020-08-31 12:51:46 +02:00 committed by GitHub
commit 300d7f661a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2740,10 +2740,17 @@ function defocusSearchBar() {
});
}
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 = [];
@ -2781,10 +2788,7 @@ function defocusSearchBar() {
elem.value = savedCrate;
}
}
if (search_input) {
search_input.removeAttribute('disabled');
}
enableSearchInput();
};
function buildHelperPopup() {