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 4e6ad72 commit d5a51f9Copy full SHA for d5a51f9
src/directives/on.js
@@ -1,12 +1,9 @@
1
var utils = require('../utils')
2
3
-function delegateCheck (current, top, identifier) {
4
- if (current[identifier]) {
5
- return current
6
- } else if (current === top || !current.parentNode) {
7
- return false
8
- } else {
9
- return delegateCheck(current.parentNode, top, identifier)
+function delegateCheck (el, root, identifier) {
+ while (el && el !== root) {
+ if (el[identifier]) return el
+ el = el.parentNode
10
}
11
12
0 commit comments