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 'js/dist/tab.js')
-rw-r--r--js/dist/tab.js24
1 files changed, 6 insertions, 18 deletions
diff --git a/js/dist/tab.js b/js/dist/tab.js
index bf7c991b41..e36ff611a4 100644
--- a/js/dist/tab.js
+++ b/js/dist/tab.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap tab.js v5.2.0-beta1 (https://getbootstrap.com/)
+ * Bootstrap tab.js v5.2.0 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -17,7 +17,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.2.0-beta1): tab.js
+ * Bootstrap (v5.2.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -118,15 +118,9 @@
this._activate(index.getElementFromSelector(element)); // Search and activate/show the proper section
- const isAnimated = element.classList.contains(CLASS_NAME_FADE);
-
const complete = () => {
- if (isAnimated) {
- // todo: maybe is redundant
- element.classList.add(CLASS_NAME_SHOW);
- }
-
if (element.getAttribute('role') !== 'tab') {
+ element.classList.add(CLASS_NAME_SHOW);
return;
}
@@ -141,7 +135,7 @@
});
};
- this._queueCallback(complete, element, isAnimated);
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));
}
_deactivate(element, relatedElem) {
@@ -155,15 +149,9 @@
this._deactivate(index.getElementFromSelector(element)); // Search and deactivate the shown section too
- const isAnimated = element.classList.contains(CLASS_NAME_FADE);
-
const complete = () => {
- if (isAnimated) {
- // todo maybe is redundant
- element.classList.remove(CLASS_NAME_SHOW);
- }
-
if (element.getAttribute('role') !== 'tab') {
+ element.classList.remove(CLASS_NAME_SHOW);
return;
}
@@ -177,7 +165,7 @@
});
};
- this._queueCallback(complete, element, isAnimated);
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));
}
_keydown(event) {