diff --git a/sites/svelte-5-preview/src/lib/Output/srcdoc/index.html b/sites/svelte-5-preview/src/lib/Output/srcdoc/index.html index 21f049cbc..202a5f973 100644 --- a/sites/svelte-5-preview/src/lib/Output/srcdoc/index.html +++ b/sites/svelte-5-preview/src/lib/Output/srcdoc/index.html @@ -86,7 +86,8 @@ } if (action === 'catch_clicks') { - document.body.addEventListener('click', (event) => { + // attached to document to not interfere with svelte's event delegators that are attached to the app root (document.body) + document.addEventListener('click', (event) => { if (event.which !== 1) return; if (event.metaKey || event.ctrlKey || event.shiftKey) return; if (event.defaultPrevented) return;