Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Changing enableContentPanningGesture remounts content #2066

Open
joeporpeglia opened this issue Dec 2, 2024 · 4 comments
Open

[Bug]: Changing enableContentPanningGesture remounts content #2066

joeporpeglia opened this issue Dec 2, 2024 · 4 comments
Labels
bug Something isn't working no-issue-activity

Comments

@joeporpeglia
Copy link

Version

v5

Reanimated Version

v3

Gesture Handler Version

v2

Platforms

iOS, Android, Web

What happened?

In v4 I was using enableContentPanningGesture to disable the swipe down gesture while users are in "full screen mode". In 2962a2d the render logic was updated to swap parent components depending on the value of that prop.

Current workaround: Replace enableContentPanningGesture={false} with activeOffsetY={999999}

Reproduction steps

  • Open the logs view in the repro
  • Click "Change panning gesture"
  • You should see a log indicating that the Test component re-mounted

Reproduction sample

https://snack.expo.dev/@playbackjoe/bottom-sheet---issue-reproduction-template

Relevant log output

No response

@joeporpeglia joeporpeglia added the bug Something isn't working label Dec 2, 2024
@buynao
Copy link

buynao commented Dec 13, 2024

same issue

@dlee
Copy link

dlee commented Dec 21, 2024

Unfortunately, the activeOffsetY={999999} workaround won't work for me since I'm trying to disable the swipe-down gestures once a user starts dragging a child slider, but starting the drag already activates the Bottom Sheet gesture.

EDIT: Actually, the activeOffsetY workaround works in Android if you also provide failOffsetY={0}. However, it doesn't work in iOS.

It seems like this was meant to be the workaround, but it doesn't work:
https://gorhom.dev/react-native-bottom-sheet/troubleshooting#my-component-gesture-interaction-gets-conflicted-with-bottom-sheet-interactions-

@josegiufrida
Copy link

josegiufrida commented Jan 7, 2025

Same issue here.

It's due to this new code:

// BottomSheet.tsx

const DraggableView = enableContentPanningGesture
    ? BottomSheetDraggableView
    : Animated.View;

<DraggableView
    key="BottomSheetRootDraggableView"
    style={contentContainerStyle}
>
    {children}
</DraggableView>

I've been looking for a solution but without success so far.
This is the commit if it helps anyone:
2962a2d#diff-07b237af01ea6130369196bdab6d5e7d33715f3750c7f220768848083c3a876aR36

Copy link

github-actions bot commented Feb 7, 2025

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

4 participants