Modal bugs out and reveals view behind when dragging down with gesture
See original GitHub issueDescription
I’m sorry for the title, but I couldn’t find better words to describe this.
When using the native stack navigator to present a screen modally, the screen slides up like a pageSheet
or formSheet
on iOS. A users reaction might be sliding it back down, which is native behaviour for action sheets in iOS. The problem is, that the screen moves up and shows what’s beneath it.
The weird this is, I cannot reproduce this issue on my iPhone 11 simulator, but it happens every time on my real iPhone 11 Pro device.
Demo
Here’s a demo:
Additional Info
For my NativeStackNavigationOptions
in the Parent Stack navigator I am using:
stackPresentation: 'modal',
gestureEnabled: false,
, and the child stack navigator (the screens inside the modal) have the following NativeStackNavigationOptions
:
headerShown: true,
headerStyle: {
backgroundColor: Colors.current.identity,
},
headerTintColor: Colors.current.white,
headerTitleStyle: {
color: Colors.current.white,
fontSize: 20,
},
Versions
package.json
...
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-screens": "^2.9.0",
...
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:21 (12 by maintainers)
Top Results From Across the Web
In iOS, how to drag down to dismiss a modal? - Stack Overflow
I just created a tutorial for interactively dragging down a modal to dismiss it. ... let translation = panGesture.translation(in: view) if panGesture.state ...
Read more >iOS 15 'Drag to Dismiss' Regression | Apple Developer Forums
It seems that iOS 15 has broken modal view controller 'drag to dismiss' under the following configuration: The presented modal contains a nested...
Read more >The Accessibility Bugs Introduced and Resolved in iOS 15 ...
iOS 15 and iPadOS 15 have been released to the public. This post contains details of the VoiceOver, low vision, and braille bugs...
Read more >Stage Manager in iPadOS 16: At the Intersection of Bugs ...
The fact that Apple delayed, slimmed down, and kept iterating on ... When I drag a window from the strip, Stage Manager shows...
Read more >Create advanced animations with smart animate
Users with can view access to a file or prototype can view prototypes. ... Loading sequences; Parallax scrolling; Touch gestures e.g. Drag, Swipe, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, here’s another demo, seems related:
I don’t know why it flickers here and doesn’t on the other demo, maybe because I’m using
SafeAreaView
here?Is the bug from the GIF appearing after applying #712? If so, could you provide a reproduction of this? You can use
TestsExample
app for it: https://github.com/software-mansion/react-native-screens/tree/master/TestsExample. About the disabling of dragging, I am afraid it is not provided by the platform.