diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-03-11 18:13:30 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-03-11 18:59:08 +0300 |
commit | ac67e04ce016406377595291ff1357eda63cc311 (patch) | |
tree | 4ad39e3b7079bdb0494ed827f90f49dda7b35ee2 /js/dist/dom/eventhandler.js | |
parent | c2b05dd7b5e6e66475dc89de1ca9466c92eb1e90 (diff) |
Dist.
Diffstat (limited to 'js/dist/dom/eventhandler.js')
-rw-r--r-- | js/dist/dom/eventhandler.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/dist/dom/eventhandler.js b/js/dist/dom/eventhandler.js index 14d5f80b6c..18cbf23567 100644 --- a/js/dist/dom/eventhandler.js +++ b/js/dist/dom/eventhandler.js @@ -17,7 +17,8 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ - var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp) + var _window = window, + jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp) /** * -------------------------------------------------------------------------- @@ -56,13 +57,14 @@ function getEvent(element) { var uid = getUidEvent(element); element.uidEvent = uid; - return eventRegistry[uid] = eventRegistry[uid] || {}; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; } function fixEvent(event, element) { // Add which for key events if (event.which === null && keyEventRegex.test(event.type)) { - event.which = event.charCode !== null ? event.charCode : event.keyCode; + event.which = event.charCode === null ? event.keyCode : event.charCode; } event.delegateTarget = element; @@ -167,7 +169,7 @@ } var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, '')); - var fn = !delegation ? bootstrapHandler(element, handler) : bootstrapDelegationHandler(element, handler, delegationFn); + var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler); fn.delegationSelector = delegation ? handler : null; fn.originalHandler = originalHandler; fn.oneOff = oneOff; |