Skip to content

Commit 54063f4

Browse files
committed
allow transition to specify css: false
1 parent 8c4af80 commit 54063f4

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/transition/transition.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,18 @@ p.callHookWithCb = function (type) {
245245
*/
246246

247247
p.getCssTransitionType = function (className) {
248-
// skip CSS transitions if page is not visible -
249-
// this solves the issue of transitionend events not
250-
// firing until the page is visible again.
251-
// pageVisibility API is supported in IE10+, same as
252-
// CSS transitions.
253248
/* istanbul ignore if */
254-
if (!transitionEndEvent || document.hidden) {
249+
if (
250+
!transitionEndEvent ||
251+
// skip CSS transitions if page is not visible -
252+
// this solves the issue of transitionend events not
253+
// firing until the page is visible again.
254+
// pageVisibility API is supported in IE10+, same as
255+
// CSS transitions.
256+
document.hidden ||
257+
// explicit js-only transition
258+
(this.hooks && this.hooks.css === false)
259+
) {
255260
return
256261
}
257262
var type = this.typeCache[className]

0 commit comments

Comments
 (0)