Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r--dist/js/bootstrap.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js
index 435f076d35..03c194a4ee 100644
--- a/dist/js/bootstrap.js
+++ b/dist/js/bootstrap.js
@@ -108,7 +108,7 @@
var getUID = function getUID(prefix) {
do {
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
+ prefix += Math.floor(Math.random() * MAX_UID);
} while (document.getElementById(prefix));
return prefix;
@@ -2894,6 +2894,8 @@
this._element.setAttribute('aria-modal', true);
+ this._element.setAttribute('role', 'dialog');
+
this._element.scrollTop = 0;
if (modalBody) {
@@ -2981,6 +2983,8 @@
this._element.removeAttribute('aria-modal');
+ this._element.removeAttribute('role');
+
this._isTransitioning = false;
this._showBackdrop(function () {
@@ -3311,7 +3315,7 @@
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
- return SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue);
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
@@ -3322,7 +3326,7 @@
}); // Check if a regular expression validates the attribute.
for (var i = 0, len = regExp.length; i < len; i++) {
- if (regExp[i].test(attrName)) {
+ if (attrName.match(regExp[i])) {
return true;
}
}