aboutsummaryrefslogtreecommitdiff
path: root/js/src/tab.js
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2021-04-11 02:27:18 +0300
committerMark Otto <[email protected]>2021-05-10 13:59:55 -0700
commit90b1a6907ed7bb3397fe6bd223f09eb12122d7a3 (patch)
treed666c155808a77ee51ab2296f549279b8f88873e /js/src/tab.js
parent9106d2a0eaa53a58d6cf6eef7250634329578843 (diff)
downloadbootstrap-90b1a6907ed7bb3397fe6bd223f09eb12122d7a3.tar.xz
bootstrap-90b1a6907ed7bb3397fe6bd223f09eb12122d7a3.zip
Merge js-components 'transitionend' listener callbacks into one method
Diffstat (limited to 'js/src/tab.js')
-rw-r--r--js/src/tab.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 73eb5a820..8ee273811 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -7,9 +7,7 @@
import {
defineJQueryPlugin,
- emulateTransitionEnd,
getElementFromSelector,
- getTransitionDurationFromElement,
isDisabled,
reflow
} from './util/index'
@@ -125,11 +123,8 @@ class Tab extends BaseComponent {
const complete = () => this._transitionComplete(element, active, callback)
if (active && isTransitioning) {
- const transitionDuration = getTransitionDurationFromElement(active)
active.classList.remove(CLASS_NAME_SHOW)
-
- EventHandler.one(active, 'transitionend', complete)
- emulateTransitionEnd(active, transitionDuration)
+ this._queueCallback(complete, element, true)
} else {
complete()
}