mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-07 22:26:57 +02:00
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` &&
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user