Skip to content

Commit 96541d5

Browse files
author
Evan You
committed
add e.targetEl to account for e.currentTarget
1 parent 398bf7e commit 96541d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/on.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ module.exports = {
1919
utils.warn('Directive "on" expects a function value.')
2020
return
2121
}
22-
var targetVM = this.vm,
22+
var el = this.el,
23+
targetVM = this.vm,
2324
ownerVM = this.binding.compiler.vm,
2425
isExp = this.binding.isExp,
2526
newHandler = function (e) {
27+
e.targetEl = el
2628
e.targetVM = targetVM
2729
handler.call(isExp ? targetVM : ownerVM, e)
2830
}

0 commit comments

Comments
 (0)