Skip to content

Commit c110679

Browse files
authored
fix: don't use AnimatedNativeScreen when stackPresentation prop is not set (#2107)
## Description All navigators except `native-stack` does not set `stackPresentation` so it resolved in `AnimatedNativeModalScreen` making all navigators that are nested or under some views not work with pressability. Follow-up to #2028 ## Changes - Added `undefined` case for setting AnimatedNativeScreen ## Test code and steps to reproduce You can check `Test1214.tsx` or `Test2028.tsx` (after changing import to `@react-navigation/stack`) in order to test targets of touchables. ## Checklist - [x] Ensured that CI passes
1 parent 6b694e3 commit c110679

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/Screen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class InnerScreen extends React.Component<ScreenProps> {
7979
// Due to how Yoga resolves layout, we need to have different components for modal nad non-modal screens
8080
const AnimatedScreen =
8181
Platform.OS === 'android' ||
82+
stackPresentation === undefined ||
8283
stackPresentation === 'push' ||
8384
stackPresentation === 'containedModal' ||
8485
stackPresentation === 'containedTransparentModal'

0 commit comments

Comments
 (0)