diff options
| author | alpadev <[email protected]> | 2021-06-03 13:44:16 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-03 14:44:16 +0300 |
| commit | 4a5029ea29ac75243dfec68153051292fc70f5cf (patch) | |
| tree | 7d0a74707b0f1ab8254610a53dcbf92eabae81b4 /js/src/base-component.js | |
| parent | 071a288d39f70719c771cd56ded6c36b5d150a83 (diff) | |
| download | bootstrap-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/base-component.js')
| -rw-r--r-- | js/src/base-component.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/js/src/base-component.js b/js/src/base-component.js index a5f1b36a0..368cc99c8 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 */ |
