Skip to content

Commit 65109a7

Browse files
quiteeasyVadim Kruglov
and
Vadim Kruglov
authoredApr 22, 2024··
fix(transition): transition is breaking/flickering when enter is canceled (#10688)
Co-authored-by: Vadim Kruglov <vadim.kruglov@libertexgroup.com>
1 parent 88c9d26 commit 65109a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎packages/runtime-dom/src/components/Transition.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,11 @@ export function resolveTransitionProps(
239239
if (__COMPAT__ && legacyClassEnabled && legacyLeaveFromClass) {
240240
addTransitionClass(el, legacyLeaveFromClass)
241241
}
242+
// add *-leave-active class before reflow so in the case of a cancelled enter transition
243+
// the css will not get the final state (#10677)
244+
addTransitionClass(el, leaveActiveClass)
242245
// force reflow so *-leave-from classes immediately take effect (#2593)
243246
forceReflow()
244-
addTransitionClass(el, leaveActiveClass)
245247
nextFrame(() => {
246248
if (!el._isLeaving) {
247249
// cancelled

0 commit comments

Comments
 (0)
Please sign in to comment.