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) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 15:30:57 +00:00
parent ebbdec8f4c
commit 8aecbcc094

View File

@@ -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