Skip to content

Commit 7cc3919

Browse files
committed
Don't mark as delayed if we started or aborted an animation
1 parent 9eb4842 commit 7cc3919

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,7 +3504,9 @@ function commitRoot(
35043504
// event when logging events.
35053505
trackSchedulerEvent();
35063506
}
3507-
pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT;
3507+
if (pendingDelayedCommitReason === IMMEDIATE_COMMIT) {
3508+
pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT;
3509+
}
35083510
flushPassiveEffects();
35093511
// This render triggered passive effects: release the root cache pool
35103512
// *after* passive effects fire to avoid freeing a cache pool that may
@@ -4174,7 +4176,9 @@ function releaseRootPooledCache(root: FiberRoot, remainingLanes: Lanes) {
41744176
let didWarnAboutInterruptedViewTransitions = false;
41754177

41764178
export function flushPendingEffectsDelayed(): boolean {
4177-
pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT;
4179+
if (pendingDelayedCommitReason === IMMEDIATE_COMMIT) {
4180+
pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT;
4181+
}
41784182
return flushPendingEffects();
41794183
}
41804184

0 commit comments

Comments
 (0)