aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-03-20 11:07:58 +0100
committerJohann-S <[email protected]>2018-03-20 15:56:51 +0100
commitbedc96e48bebb7a1124a97833794a8047a1e3b95 (patch)
tree0db43f0a301cf836fb9198a4957231a097a90f06 /js/src/modal.js
parent2306f62bf19bb0696a9455aaf2eea6b083d9fdae (diff)
downloadbootstrap-bedc96e48bebb7a1124a97833794a8047a1e3b95.tar.xz
bootstrap-bedc96e48bebb7a1124a97833794a8047a1e3b95.zip
Use transitionEnd in QUnit since we moved away from PhantomJS
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js17
1 files changed, 6 insertions, 11 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 414359e97..efe2f0d4a 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -107,7 +107,7 @@ const Modal = (($) => {
return
}
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
+ if ($(this._element).hasClass(ClassName.FADE)) {
this._isTransitioning = true
}
@@ -168,8 +168,7 @@ const Modal = (($) => {
}
this._isShown = false
-
- const transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)
+ const transition = $(this._element).hasClass(ClassName.FADE)
if (transition) {
this._isTransitioning = true
@@ -228,8 +227,7 @@ const Modal = (($) => {
}
_showElement(relatedTarget) {
- const transition = Util.supportsTransitionEnd() &&
- $(this._element).hasClass(ClassName.FADE)
+ const transition = $(this._element).hasClass(ClassName.FADE)
if (!this._element.parentNode ||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
@@ -331,8 +329,6 @@ const Modal = (($) => {
? ClassName.FADE : ''
if (this._isShown && this._config.backdrop) {
- const doAnimate = Util.supportsTransitionEnd() && animate
-
this._backdrop = document.createElement('div')
this._backdrop.className = ClassName.BACKDROP
@@ -357,7 +353,7 @@ const Modal = (($) => {
}
})
- if (doAnimate) {
+ if (animate) {
Util.reflow(this._backdrop)
}
@@ -367,7 +363,7 @@ const Modal = (($) => {
return
}
- if (!doAnimate) {
+ if (!animate) {
callback()
return
}
@@ -387,8 +383,7 @@ const Modal = (($) => {
}
}
- if (Util.supportsTransitionEnd() &&
- $(this._element).hasClass(ClassName.FADE)) {
+ if ($(this._element).hasClass(ClassName.FADE)) {
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
$(this._backdrop)