aboutsummaryrefslogtreecommitdiff
path: root/js/src/util/backdrop.js
diff options
context:
space:
mode:
authoralpadev <[email protected]>2021-06-03 13:44:16 +0200
committerGitHub <[email protected]>2021-06-03 14:44:16 +0300
commit4a5029ea29ac75243dfec68153051292fc70f5cf (patch)
tree7d0a74707b0f1ab8254610a53dcbf92eabae81b4 /js/src/util/backdrop.js
parent071a288d39f70719c771cd56ded6c36b5d150a83 (diff)
downloadbootstrap-4a5029ea29ac75243dfec68153051292fc70f5cf.tar.xz
bootstrap-4a5029ea29ac75243dfec68153051292fc70f5cf.zip
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/util/backdrop.js')
-rw-r--r--js/src/util/backdrop.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js
index 07ad20fab..028325d11 100644
--- a/js/src/util/backdrop.js
+++ b/js/src/util/backdrop.js
@@ -6,7 +6,7 @@
*/
import EventHandler from '../dom/event-handler'
-import { emulateTransitionEnd, execute, getElement, getTransitionDurationFromElement, reflow, typeCheckConfig } from './index'
+import { execute, executeAfterTransition, getElement, reflow, typeCheckConfig } from './index'
const Default = {
isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
@@ -122,14 +122,7 @@ class Backdrop {
}
_emulateAnimation(callback) {
- if (!this._config.isAnimated) {
- execute(callback)
- return
- }
-
- const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement())
- EventHandler.one(this._getElement(), 'transitionend', () => execute(callback))
- emulateTransitionEnd(this._getElement(), backdropTransitionDuration)
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated)
}
}