Closed Bartozzz closed 2 years ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?
I believe it is a duplicate of the discussion from here: https://github.com/software-mansion/react-native-screens/issues/736#issuecomment-762179482, so maybe we should close this one to keep the discussion in one place? Also, if you know of any native apps that provide a behavior of not being able to drag modal down a little, please provide them there. I am afraid it would be wrong from the HIG from apple to not be able to drag the formSheet
modal a little and if you want such behavior, you should use fullScreenModal
. I will close this issue then. Feel free to comment here if I am wrong and we can always reopen it then.
hi @WoLewicki -- I think we should reopen this issue
One example which is common in many apps is to allow dragging e.g. a slider or highlighting things on a graph-- when the modal jerks a bit, it breaks the slider or graph. Let me know if you still disagree with this.
@macalinao could you provide here e.g. a short video clip of an app with the formsheet modal where you can do such things and the modal is not moved?
Might be related to https://github.com/software-mansion/react-native-screens/issues/1022.
Description
gestureEnabled: false
does not prevent the swipe gesture on Native Stack modals (presentation: 'modal'
). Instead, it bounces modals to their original position on release.Context
I have a Native Stack modal with gestures disabled and a close button inside. I want to dismiss the modal on close button press and disable the swipe gesture to prevent the user from seeing what's underneath the modal.
I tried wrapping the whole content in a
<ScrollView>
/<Pressable>
thinking it will capture the user's gestures and prevent the Stack from swiping on scroll, but it looks like RN touch events are canceled.Screenshots
https://user-images.githubusercontent.com/6741707/163718148-7c34de53-1e4f-46b2-9dab-11b20cd5b37c.mov
Expected behavior
The modal should have gestures disabled and don't move on scroll gestures.
Actual behavior
The modal moves up/down on scroll gesture and bounces to its original position on release.
Steps To Reproduce
Reproduction
Platform
Workflow
Package versions
0.64.3
^6.0.2
^6.1.0
~3.10.1
3.3.2
~2.1.0
~2.3.1
~44.0.0