mirror of https://github.com/vuejs/core.git
fix(transition): transition is breaking/flickering when enter is canceled (#10688)
Co-authored-by: Vadim Kruglov <vadim.kruglov@libertexgroup.com>
This commit is contained in:
parent
88c9d264ea
commit
65109a70f1
|
@ -239,9 +239,11 @@ export function resolveTransitionProps(
|
|||
if (__COMPAT__ && legacyClassEnabled && legacyLeaveFromClass) {
|
||||
addTransitionClass(el, legacyLeaveFromClass)
|
||||
}
|
||||
// add *-leave-active class before reflow so in the case of a cancelled enter transition
|
||||
// the css will not get the final state (#10677)
|
||||
addTransitionClass(el, leaveActiveClass)
|
||||
// force reflow so *-leave-from classes immediately take effect (#2593)
|
||||
forceReflow()
|
||||
addTransitionClass(el, leaveActiveClass)
|
||||
nextFrame(() => {
|
||||
if (!el._isLeaving) {
|
||||
// cancelled
|
||||
|
|
Loading…
Reference in New Issue