question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modal bugs out and reveals view behind when dragging down with gesture

See original GitHub issue

Description

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:

t

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:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mrousavycommented, Jul 29, 2020

Also, here’s another demo, seems related:

RPReplay_Final1596031780 mov

I don’t know why it flickers here and doesn’t on the other demo, maybe because I’m using SafeAreaView here?

1reaction
WoLewickicommented, Nov 17, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found