about summary refs log tree commit diff
diff options
context:
space:
mode:
authorasrar <aszenz@gmail.com>2020-08-29 09:33:41 +0000
committerasrar <aszenz@gmail.com>2020-08-29 09:33:41 +0000
commit7ee515579ea5230b3fac0b7b33f752e28ff13224 (patch)
treec02a5377bbf521ac20a8fb75f7fe07096cdc10fd
parentd8424f6b426f91ae39dbeacd631a82aad5d733f4 (diff)
downloadrust-7ee515579ea5230b3fac0b7b33f752e28ff13224.tar.gz
rust-7ee515579ea5230b3fac0b7b33f752e28ff13224.zip
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
-rw-r--r--src/librustdoc/html/static/main.js7
1 files 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() {