fix: delegate events on elements with bind-this

fixes #9688
pull/9696/head
Simon Holthausen 3 years ago
parent 3e3ae925f3
commit 0ae74d9efc

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: delegate events on elements with bind-this

@ -1094,7 +1094,8 @@ function determine_element_spread_and_delegatable(node) {
has_spread = true;
} else if (
!has_action_or_bind &&
(attribute.type === 'BindDirective' || attribute.type === 'UseDirective')
((attribute.type === 'BindDirective' && attribute.name !== 'this') ||
attribute.type === 'UseDirective')
) {
has_action_or_bind = true;
}

Loading…
Cancel
Save