Skip to content

Commit 952cd6f

Browse files
committed
fix: add emulateTransitionEnd
1 parent 41bc622 commit 952cd6f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

js/src/sidebar.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {
99
getjQuery,
1010
reflow,
1111
TRANSITION_END,
12+
emulateTransitionEnd,
13+
getTransitionDurationFromElement,
1214
typeCheckConfig
1315
} from './util/index'
1416
import Data from './dom/data'
@@ -146,7 +148,10 @@ class Sidebar {
146148
}
147149
}
148150

151+
const transitionDuration = getTransitionDurationFromElement(this._element)
152+
149153
EventHandler.one(this._element, TRANSITION_END, complete)
154+
emulateTransitionEnd(this._element, transitionDuration)
150155
}
151156

152157
close(breakpoint) {
@@ -175,7 +180,10 @@ class Sidebar {
175180
}
176181
}
177182

183+
const transitionDuration = getTransitionDurationFromElement(this._element)
184+
178185
EventHandler.one(this._element, TRANSITION_END, complete)
186+
emulateTransitionEnd(this._element, transitionDuration)
179187
}
180188

181189
toggle(breakpoint) {

0 commit comments

Comments
 (0)