mirror of https://github.com/sveltejs/svelte
fix: remove stale capture listeners from spread attributes (#18618)
Fixes #18608. When `set_attributes` normalized removed spread attributes, it also copied its internal `$$` listener bookkeeping keys into `next` with a `null` value. This cleared the stored callback before event cleanup, so removing a capture handler passed `null` to `removeEventListener` and left the listener attached. Skip internal `$$` keys during missing-attribute normalization. The updated runtime-runes sample verifies replacing and then removing a spread capture handler in both client and hydration modes. --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>pull/18606/merge
parent
a224dd5867
commit
c0987c09f8
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: clean up removed capture event handlers from spread attributes
|
||||
Loading…
Reference in new issue