We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2416587 commit 1fe0152Copy full SHA for 1fe0152
.changeset/chatty-taxis-juggle.md
@@ -0,0 +1,5 @@
1
+---
2
+'svelte': patch
3
4
+
5
+fix: delegate events on elements with bind-this
packages/svelte/src/compiler/phases/2-analyze/index.js
@@ -1106,7 +1106,8 @@ function determine_element_spread_and_delegatable(node) {
1106
has_spread = true;
1107
} else if (
1108
!has_action_or_bind &&
1109
- (attribute.type === 'BindDirective' || attribute.type === 'UseDirective')
+ ((attribute.type === 'BindDirective' && attribute.name !== 'this') ||
1110
+ attribute.type === 'UseDirective')
1111
) {
1112
has_action_or_bind = true;
1113
}
0 commit comments