From 8aecbcc094594a471513c0f8ecfe9d6e54eb2ef1 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 25 Mar 2026 15:30:57 +0000 Subject: [PATCH] Fix click buffering: use correct hydration property name The event buffer script checked _sxBoundislandHydrated (camelCase) but mark-processed! sets _sxBoundisland-hydrated (with hyphen). The mismatch meant stopPropagation() fired on EVERY click, killing all island button handlers. Co-Authored-By: Claude Opus 4.6 (1M context) --- shared/sx/templates/shell.sx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/sx/templates/shell.sx b/shared/sx/templates/shell.sx index cedf396d..08688ed7 100644 --- a/shared/sx/templates/shell.sx +++ b/shared/sx/templates/shell.sx @@ -77,7 +77,7 @@ details.group{overflow:hidden}details.group>summary{list-style:none}details.grou ;; Server-rendered HTML — visible immediately before JS loads (div :id "sx-root" (raw! (or body-html ""))) ;; Event buffer — captures clicks during hydration gap, replayed after boot - (script (raw! "document.addEventListener('click',function(e){var i=e.target.closest('[data-sx-island]');if(i&&!i._sxBoundislandHydrated){e.stopPropagation();(window._sxQ=window._sxQ||[]).push({t:e.target,ts:Date.now()})}},true)")) + (script (raw! "document.addEventListener('click',function(e){var i=e.target.closest('[data-sx-island]');if(i&&!i['_sxBoundisland-hydrated']){e.stopPropagation();(window._sxQ=window._sxQ||[]).push({t:e.target,ts:Date.now()})}},true)")) (script :type "text/sx" :data-components true :data-hash component-hash (raw! (or component-defs ""))) (when init-sx