Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/src/tests/Test3093.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
NativeStackNavigationProp,
createNativeStackNavigator,
} from '@react-navigation/native-stack';
import { Button, Text, View, ScrollView } from 'react-native';
import { Button, Text, ScrollView } from 'react-native';
import Colors from '../shared/styling/Colors';

type StackRouteParamList = {
Expand Down Expand Up @@ -37,6 +37,7 @@ export default function App() {
return (
<NavigationContainer>
<Stack.Navigator screenOptions={{
fullScreenGestureEnabled: true,
headerStyle: {
backgroundColor: Colors.PurpleDark120
}
Expand Down
17 changes: 17 additions & 0 deletions ios/RNSScreenStack.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,14 @@ - (BOOL)isScrollViewPanGestureRecognizer:(UIGestureRecognizer *)gestureRecognize
// Be careful when adding another type of gesture recognizer.
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceivePressOrTouchEvent:(NSObject *)event
{
if (@available(iOS 26, *)) {
// in iOS 26, you can swipe to pop screen before the previous one finished transitioning;
// this prevents from registering the second gesture
if ([self isTransitionInProgress]) {
return NO;
}
}

RNSScreenView *topScreen = _reactSubviews.lastObject;

for (RNSScreenView *s in _reactSubviews.reverseObjectEnumerator) {
Expand Down Expand Up @@ -1262,6 +1270,15 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive
return [self gestureRecognizer:gestureRecognizer shouldReceivePressOrTouchEvent:touch];
}

- (BOOL)isTransitionInProgress
{
if (_controller.transitionCoordinator != nil) {
return YES;
}

return NO;
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
Expand Down
Loading