Skip to content

Commit b10e38d

Browse files
committed
Reset currentEventTransitionLane after flushing sync work
1 parent 21fdf30 commit b10e38d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-reconciler/src/ReactFiberRootScheduler.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ function processRootScheduleInMicrotask() {
257257
// preserve the scroll position of the previous page.
258258
syncTransitionLanes = currentEventTransitionLane;
259259
}
260-
currentEventTransitionLane = NoLane;
261260
}
262261

263262
const currentTime = now();
@@ -315,6 +314,9 @@ function processRootScheduleInMicrotask() {
315314
if (!hasPendingCommitEffects()) {
316315
flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
317316
}
317+
318+
// Reset Event Transition Lane so that we allocate a new one next time.
319+
currentEventTransitionLane = NoLane;
318320
}
319321

320322
function scheduleTaskForRootDuringMicrotask(

0 commit comments

Comments
 (0)