From 7ee515579ea5230b3fac0b7b33f752e28ff13224 Mon Sep 17 00:00:00 2001 From: asrar Date: Sat, 29 Aug 2020 09:33:41 +0000 Subject: [PATCH] GH-66816: Removes disable 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 --- src/librustdoc/html/static/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 881b27a5d61..1dea27e7491 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -2740,6 +2740,10 @@ function defocusSearchBar() { } window.addSearchOptions = function(crates) { + if (search_input) { + search_input.removeAttribute('disabled'); + } + var elem = document.getElementById("crate-search"); if (!elem) { @@ -2781,9 +2785,6 @@ function defocusSearchBar() { } } - if (search_input) { - search_input.removeAttribute('disabled'); - } }; function buildHelperPopup() {