aboutsummaryrefslogtreecommitdiff
path: root/js/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/util')
-rw-r--r--js/src/util/index.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/js/src/util/index.js b/js/src/util/index.js
index c7cb3176a..874827b16 100644
--- a/js/src/util/index.js
+++ b/js/src/util/index.js
@@ -66,10 +66,7 @@ const getTransitionDurationFromElement = element => {
}
// Get transition-duration of the element
- let {
- transitionDuration,
- transitionDelay
- } = window.getComputedStyle(element)
+ let { transitionDuration, transitionDelay } = window.getComputedStyle(element)
const floatTransitionDuration = Number.parseFloat(transitionDuration)
const floatTransitionDelay = Number.parseFloat(transitionDelay)
@@ -96,6 +93,7 @@ const emulateTransitionEnd = (element, duration) => {
let called = false
const durationPadding = 5
const emulatedDuration = duration + durationPadding
+
function listener() {
called = true
element.removeEventListener(TRANSITION_END, listener)