Skip to content

Commit

Permalink
Disable swipe down gesture in Modal component
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

Paper implementation prevents swipe to dismiss gesture in Modal.

https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/React/Views/RCTModalHostViewController.m?commit=9d1f344633fb&lines=25-30

This diff implements the same in Fabric.

Reviewed By: ShikaSD

Differential Revision: D26910753

fbshipit-source-id: cb036ce0a9cd57c7d549a1a58eb941d8e64f2468
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Mar 9, 2021
1 parent 2f67c8d commit 311d2fb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ - (instancetype)init
}
_touchHandler = [RCTSurfaceTouchHandler new];

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
if (@available(iOS 13.0, *)) {
self.modalInPresentation = YES;
}
#endif

return self;
}

Expand Down

0 comments on commit 311d2fb

Please sign in to comment.