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:
authoralpadev <2838324+alpadev@users.noreply.github.com>2021-06-03 14:44:16 +0300
committerGitHub <noreply@github.com>2021-06-03 14:44:16 +0300
commit4a5029ea29ac75243dfec68153051292fc70f5cf (patch)
tree7d0a74707b0f1ab8254610a53dcbf92eabae81b4 /js/src/base-component.js
parent071a288d39f70719c771cd56ded6c36b5d150a83 (diff)
Fix handling of transitionend events dispatched by nested elements(#33845)
Fix handling of transitionend events dispatched by nested elements Properly handle events from nested elements Change `emulateTransitionEnd` to `executeAfterTransition` &&
Diffstat (limited to 'js/src/base-component.js')
-rw-r--r--js/src/base-component.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/js/src/base-component.js b/js/src/base-component.js
index a5f1b36a00..368cc99c88 100644
--- a/js/src/base-component.js
+++ b/js/src/base-component.js
@@ -7,10 +7,8 @@
import Data from './dom/data'
import {
- emulateTransitionEnd,
- execute,
- getElement,
- getTransitionDurationFromElement
+ executeAfterTransition,
+ getElement
} from './util/index'
import EventHandler from './dom/event-handler'
@@ -44,15 +42,7 @@ class BaseComponent {
}
_queueCallback(callback, element, isAnimated = true) {
- if (!isAnimated) {
- execute(callback)
- return
- }
-
- const transitionDuration = getTransitionDurationFromElement(element)
- EventHandler.one(element, 'transitionend', () => execute(callback))
-
- emulateTransitionEnd(element, transitionDuration)
+ executeAfterTransition(callback, element, isAnimated)
}
/** Static */