mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
This commit is contained in:
7
js/dist/util.js
vendored
7
js/dist/util.js
vendored
@@ -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;
|
||||
|
Reference in New Issue
Block a user