@@ -105,6 +105,7 @@ export async function renderToStream(
105
105
if ( containerTagName === 'html' ) {
106
106
stream . write ( DOCTYPE ) ;
107
107
} else {
108
+ // The container is not `<html>` so we don't include the qwikloader by default
108
109
stream . write ( '<!--cq-->' ) ;
109
110
if ( opts . qwikLoader ) {
110
111
if ( opts . qwikLoader . include === undefined ) {
@@ -138,7 +139,9 @@ export async function renderToStream(
138
139
139
140
const includeMode = opts . qwikLoader ?. include ?? 'auto' ;
140
141
const positionMode = opts . qwikLoader ?. position ?? 'bottom' ;
142
+ let didAddQwikLoader = false ;
141
143
if ( positionMode === 'top' && includeMode !== 'never' ) {
144
+ didAddQwikLoader = true ;
142
145
const qwikLoaderScript = getQwikLoaderScript ( {
143
146
debug : opts . debug ,
144
147
} ) ;
@@ -148,10 +151,10 @@ export async function renderToStream(
148
151
dangerouslySetInnerHTML : qwikLoaderScript ,
149
152
} )
150
153
) ;
151
- // Assume there will be at least click handlers
154
+ // Assume there will be at least click and input handlers
152
155
beforeContent . push (
153
156
jsx ( 'script' , {
154
- dangerouslySetInnerHTML : `window.qwikevents.push('click')` ,
157
+ dangerouslySetInnerHTML : `window.qwikevents.push('click','input' )` ,
155
158
} )
156
159
) ;
157
160
}
@@ -211,7 +214,7 @@ export async function renderToStream(
211
214
) ;
212
215
}
213
216
214
- const needLoader = ! snapshotResult || snapshotResult . mode !== 'static' ;
217
+ const needLoader = ! didAddQwikLoader && ( ! snapshotResult || snapshotResult . mode !== 'static' ) ;
215
218
const includeLoader = includeMode === 'always' || ( includeMode === 'auto' && needLoader ) ;
216
219
if ( includeLoader ) {
217
220
const qwikLoaderScript = getQwikLoaderScript ( {
0 commit comments