File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -132,15 +132,7 @@ if (themeFlyoutDisplay === "attached") {
132
132
const event = new CustomEvent ( "readthedocs-search-show" ) ;
133
133
document . dispatchEvent ( event ) ;
134
134
} ) ;
135
-
136
- // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
137
- document
138
- . querySelector ( "[role='search'] input" )
139
- . addEventListener ( "focusin" , ( ) => {
140
- const event = new CustomEvent ( "readthedocs-search-show" ) ;
141
- document . dispatchEvent ( event ) ;
142
- } ) ;
143
- } ) ;
135
+ } )
144
136
}
145
137
146
138
if ( themeLanguageSelector || themeVersionSelector ) {
@@ -219,4 +211,14 @@ if (themeLanguageSelector || themeVersionSelector) {
219
211
}
220
212
}
221
213
} ) ;
222
- }
214
+ }
215
+
216
+ document . addEventListener ( "readthedocs-addons-data-ready" , function ( event ) {
217
+ // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
218
+ document
219
+ . querySelector ( "[role='search'] input" )
220
+ . addEventListener ( "focusin" , ( ) => {
221
+ const event = new CustomEvent ( "readthedocs-search-show" ) ;
222
+ document . dispatchEvent ( event ) ;
223
+ } ) ;
224
+ } ) ;
You can’t perform that action at this time.
0 commit comments