From 7f495a3cf2e35d5f76cd26cc01084d3de84b4d68 Mon Sep 17 00:00:00 2001 From: acdlite Date: Thu, 20 Apr 2023 07:53:57 -0700 Subject: [PATCH] Synchronously flush the transition lane scheduled in a popstate event (#26025) Summary: ## Summary Browsers restore state like forms and scroll position right after the popstate event. To make sure the page work as expected on back or forward button, we need to flush transitions scheduled in a popstate synchronously, and only yields if it suspends. This PR adds a new HostConfig method to check if `window.event === 'popstate'`, and `scheduleMicrotask` if a transition is scheduled in a `PopStateEvent`. ## How did you test this change? yarn test DiffTrain build for commit https://github.com/facebook/react/commit/d121c67004a2e6b0bb5d341843663ef213f64863. Reviewed By: kassens Differential Revision: D45145742 Pulled By: sammy-SC fbshipit-source-id: 196fe3539ee8588a31012d6af86a5ce0cd7fc973 --- packages/react-native/Libraries/Renderer/REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Renderer/REVISION b/packages/react-native/Libraries/Renderer/REVISION index ad3e1c7bf79b8b..567094c26f8e3f 100644 --- a/packages/react-native/Libraries/Renderer/REVISION +++ b/packages/react-native/Libraries/Renderer/REVISION @@ -1 +1 @@ -7b0642bb989ec659c6c9891ea16daa0420caab4d +d121c67004a2e6b0bb5d341843663ef213f64863