File tree 1 file changed +11
-10
lines changed
src/librustdoc/html/static
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ function getSearchElement() {
47
47
return document . getElementById ( "search" ) ;
48
48
}
49
49
50
+ // Sets the focus on the search bar at the top of the page
51
+ function focusSearchBar ( ) {
52
+ getSearchInput ( ) . focus ( ) ;
53
+ }
54
+
55
+ // Removes the focus from the search bar
56
+ function defocusSearchBar ( ) {
57
+ getSearchInput ( ) . blur ( ) ;
58
+ }
59
+
60
+
50
61
( function ( ) {
51
62
"use strict" ;
52
63
@@ -2778,16 +2789,6 @@ function getSearchElement() {
2778
2789
buildHelperPopup ( ) ;
2779
2790
} ( ) ) ;
2780
2791
2781
- // Sets the focus on the search bar at the top of the page
2782
- function focusSearchBar ( ) {
2783
- getSearchInput ( ) . focus ( ) ;
2784
- }
2785
-
2786
- // Removes the focus from the search bar
2787
- function defocusSearchBar ( ) {
2788
- getSearchInput ( ) . blur ( ) ;
2789
- }
2790
-
2791
2792
// This is required in firefox. Explanations: when going back in the history, firefox doesn't re-run
2792
2793
// the JS, therefore preventing rustdoc from setting a few things required to be able to reload the
2793
2794
// previous search results (if you navigated to a search result with the keyboard, pressed enter on
You can’t perform that action at this time.
0 commit comments