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") {
132132 const event = new CustomEvent ( "readthedocs-search-show" ) ;
133133 document . dispatchEvent ( event ) ;
134134 } ) ;
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+ } )
144136}
145137
146138if ( themeLanguageSelector || themeVersionSelector ) {
@@ -219,4 +211,14 @@ if (themeLanguageSelector || themeVersionSelector) {
219211 }
220212 }
221213 } ) ;
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