File tree 2 files changed +3
-4
lines changed
compiler/compile/render_dom/wrappers/shared
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export default function add_event_handlers(
10
10
let snippet = handler . render ( block ) ;
11
11
if ( handler . modifiers . has ( 'preventDefault' ) ) snippet = `@prevent_default(${ snippet } )` ;
12
12
if ( handler . modifiers . has ( 'stopPropagation' ) ) snippet = `@stop_propagation(${ snippet } )` ;
13
- if ( handler . modifiers . has ( 'self' ) ) snippet = `@self(${ snippet } , ${ target } )` ;
13
+ if ( handler . modifiers . has ( 'self' ) ) snippet = `@self(${ snippet } )` ;
14
14
15
15
const opts = [ 'passive' , 'once' , 'capture' ] . filter ( mod => handler . modifiers . has ( mod ) ) ;
16
16
Original file line number Diff line number Diff line change @@ -73,11 +73,10 @@ export function stop_propagation(fn) {
73
73
} ;
74
74
}
75
75
76
- export function self ( fn , el ) {
76
+ export function self ( fn ) {
77
77
return function ( event ) {
78
- if ( event . target !== el ) return ;
79
78
// @ts -ignore
80
- return fn . call ( this , event ) ;
79
+ if ( event . target === this ) fn . call ( this , event ) ;
81
80
} ;
82
81
}
83
82
You can’t perform that action at this time.
0 commit comments