                    renderHeader={renderHeader}
                    renderScene={renderScene}
                    onOpenRoute={onOpenRoute}
-@@ -537,26 +606,7 @@ export default class CardStack extends React.Component<Props, State> {
+@@ -537,26 +612,7 @@ export default class CardStack extends React.Component<Props, State> {
              );
            })}
          </MaybeScreenContainer>

           : null
       }
diff --git a/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx b/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx
index b47a50d..eef1d6c 100755
--- a/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx
+++ b/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx
@@ -42,6 +42,7 @@ type Props = {

+      ...replacingRouteKeys,
+      focusedRoute.key,
+    ]);
+    const prevFocusedRoute = this.props.getPreviousRoute({
+      route: focusedRoute,
+    });
+    if (prevFocusedRoute) {
+      visibleKeys.add(prevFocusedRoute.key);
+    }
+    if (openingRouteKeys.length > 0) {
+      for (let scene of this.state.scenes) {
+        const { route } = scene;
