diff options
| author | Mark Otto <[email protected]> | 2016-06-12 21:17:14 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-06-12 21:17:14 -0700 |
| commit | aaad85bc306ccf35bd749ea43d2aa768e4ebabeb (patch) | |
| tree | 8011d6e04d1bb4c87356036eba55cc13639bc96a /js/dist/util.js | |
| parent | 8feae9075ae55be4e6cd0e884fbfa006a6639ceb (diff) | |
| parent | ce2e944aa6957528f23f1f7e680ac0cb4a75dcac (diff) | |
| download | bootstrap-aaad85bc306ccf35bd749ea43d2aa768e4ebabeb.tar.xz bootstrap-aaad85bc306ccf35bd749ea43d2aa768e4ebabeb.zip | |
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
Diffstat (limited to 'js/dist/util.js')
| -rw-r--r-- | js/dist/util.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/dist/util.js b/js/dist/util.js index 886f69d75..5c99cef75 100644 --- a/js/dist/util.js +++ b/js/dist/util.js @@ -17,6 +17,8 @@ var Util = (function ($) { var transition = false; + var MAX_UID = 1000000; + var TransitionEndEvent = { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', @@ -39,8 +41,9 @@ var Util = (function ($) { delegateType: transition.end, handle: function handle(event) { if ($(event.target).is(this)) { - return event.handleObj.handler.apply(this, arguments); + return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params } + return undefined; } }; } @@ -102,7 +105,7 @@ var Util = (function ($) { getUID: function getUID(prefix) { do { /* eslint-disable no-bitwise */ - prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here + prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here /* eslint-enable no-bitwise */ } while (document.getElementById(prefix)); return prefix; |
