Skip to content

Swiping a direction="vertical" Scene down only by its header or custom component #1605

Closed
@jacenko

Description

@jacenko

Version

Tell us which versions you are using:

  • react-native-router-flux v3.37.0
  • react-native v0.40.0

Expected behaviour

There should be a way to turn on the ability to swipe a modal down only by its header or specific custom component while ignoring modal swipe gestures on the content itself. This will be ideal behavior when there is a ScrollView in the Scene, for example.

Actual behaviour

When you are in a modal Scene (direction="vertical") that has a ScrollView, using panHandlers={null} on the Scene allows the ScrollView to be used without bugs, but swiping the header down doesn't do anything.

Alternatively, not using panHandlers={null} on the Scene makes the whole Scene movable, but creates unexpected behavior if there's a ScrollView within the Scene. In this scenario, only moving the ScrollView slowly works. Flicking down the ScrollView dismisses the Scene. Flicking it up just freezes the ScrollView for a second.

Steps to reproduce

  1. Create a second Scene with direction="vertical" and panHandlers={null} and add a ScrollView with a bunch of items to its component.
  2. Go to this scene using Actions.key, for example.
  3. Try to swipe/flick the ScrollView (should work). Swiping the header down won't do anything.
  4. Remove panHandlers={null} from the Scene and go to it again.
  5. You can swipe the modal by its header to dismiss but the ScrollView will be wonky as described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions