diff options
Diffstat (limited to 'js/src/dom')
-rw-r--r-- | js/src/dom/event-handler.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index b766778588..5fea030182 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -94,6 +94,7 @@ function getEvent(element) { function bootstrapHandler(element, fn) { return function handler(event) { + event.delegateTarget = element if (handler.oneOff) { EventHandler.off(element, event.type, fn) } @@ -109,6 +110,7 @@ function bootstrapDelegationHandler(element, selector, fn) { for (let { target } = event; target && target !== this; target = target.parentNode) { for (let i = domElements.length; i--;) { if (domElements[i] === target) { + event.delegateTarget = target if (handler.oneOff) { EventHandler.off(element, event.type, fn) } |