Skip to content

Commit 1000db1

Browse files
committed
fix: revealRouteBeforeDismissingModal logic on narrow
1 parent b2bd957 commit 1000db1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/libs/Navigation/Navigation.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,9 +1008,11 @@ function revealRouteBeforeDismissingModal(route: Route, options?: {afterTransiti
10081008
});
10091009
// Nested rAF: the first frame commits the route insertion, the second
10101010
// frame starts the dismiss. This ensures React processes the two dispatches
1011-
// in separate renders so the dismiss animation is preserved.
1011+
// in separate renders so the dismiss animation is preserved. On narrow,
1012+
// wait for the hidden destination transition first so the RHP slides out
1013+
// over the final page instead of briefly revealing the previous page.
10121014
requestAnimationFrame(() => {
1013-
dismissModal({afterTransition: options?.afterTransition});
1015+
dismissModal({afterTransition: options?.afterTransition, waitForTransition: getIsNarrowLayout()});
10141016
});
10151017
});
10161018
}

0 commit comments

Comments
 (0)