react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

Not Dragging On Android Modals

Open jvincent-dev opened this issue 3 years ago • 17 comments

Describe the bug Dragging to reorder doesn't work on Android when in a Modal component.

To Reproduce https://snack.expo.io/@teamlocasaur/draggableflatlist-bug

Platform & Dependencies Please list any applicable dependencies in addition to those below (react-navigation etc).

  • Platform: Android
  • React Native or Expo version: Expo 38 (40 on Snack)
  • Reanimated version: 1.9.0 (~1.13.0 on Snack)
  • React Native Gesture Handler version: 1.6.1 (~1.8.0 on Snack)

Additional context It works on regular views on Android, but not on Modals. No issues on iOS.

jvincent-dev avatar Mar 04 '21 17:03 jvincent-dev

this is a react-native-gesture-handler issue -- can you try this solution and see if it works? https://github.com/software-mansion/react-native-gesture-handler/issues/139#issuecomment-790329701 if so i'll likely include it in the package itself

computerjazz avatar Mar 09 '21 19:03 computerjazz

Hello, thank you for the response.

It did not work for me. Here's the updated snack. I've also tried it on my nexus tablet and it still doesn't seem to work.

jvincent-dev avatar Mar 09 '21 20:03 jvincent-dev

same isssue. only android problem

huurray avatar Mar 10 '21 10:03 huurray

https://github.com/software-mansion/react-native-gesture-handler/issues/139#issuecomment-760244006 this comment helped me

huurray avatar Mar 11 '21 02:03 huurray

adding coverScreen={false} to the modal component doesn't seem to do anything either.

jvincent-dev avatar Mar 15 '21 17:03 jvincent-dev

same for us, downgrading to v2.3.3 works once more

tommeier avatar Mar 18 '21 04:03 tommeier

this worked for me: from react-native-gesture-handler:

import { GestureHandlerRootView } from 'react-native-gesture-handler';

 <GestureHandlerRootView style={{width:'100%', height:'100%'}}>
.....your draggable list here
</GestureHandlerRootView>

adamsolomon1986 avatar Mar 20 '21 21:03 adamsolomon1986

Hello, thank you for the response.

It did not work for me. Here's the updated snack. I've also tried it on my nexus tablet and it still doesn't seem to work.

I've tried the GestureHandlerRootView on an Expo Snack ^ and I'm not sure why it's not working. Are you using Expo @adamsolomon1986?

I've also tried downgrading to v2.3.3, no luck either.

jvincent-dev avatar Mar 23 '21 17:03 jvincent-dev

Hello, thank you for the response. It did not work for me. Here's the updated snack. I've also tried it on my nexus tablet and it still doesn't seem to work.

I've tried the GestureHandlerRootView on an Expo Snack ^ and I'm not sure why it's not working. Are you using Expo @adamsolomon1986?

I've also tried downgrading to v2.3.3, no luck either.

I'm using bare workflow

adamsolomon1986 avatar Mar 23 '21 18:03 adamsolomon1986

I see, so applying GestureHandlerRootView to Expo bare workflow works, but not on managed. Maybe it has to do with the compatible Expo versions of rn-gesture-handler and rn-reanimated for the managed workflow?

jvincent-dev avatar Mar 25 '21 16:03 jvincent-dev

this is a react-native-gesture-handler issue -- can you try this solution and see if it works? software-mansion/react-native-gesture-handler#139 (comment) if so i'll likely include it in the package itself

does not work when used in conjunction with react-navigation, I don't know why

If you create Modal at the root of the project without using react-navigation, gestures work normally

joseviniciusnunes avatar Mar 26 '21 14:03 joseviniciusnunes

Facing same issue. draggable flautist is not working in android inside a modal.

srivastavapooja avatar Oct 04 '21 18:10 srivastavapooja

Faced the same problem, doesn't work in modal window. Still no solution?

findersen avatar Nov 23 '21 21:11 findersen

Is there any current solution for this?

Isaacmeedinaa avatar Nov 29 '21 21:11 Isaacmeedinaa

this is a react-native-gesture-handler issue -- can you try this solution and see if it works? software-mansion/react-native-gesture-handler#139 (comment) if so i'll likely include it in the package itself

This solution worked for me. Got a standalone (from react-navigation) modal. Thanks!

BenjaminGolba avatar Jan 15 '22 20:01 BenjaminGolba

this worked for me: from react-native-gesture-handler:

import { GestureHandlerRootView } from 'react-native-gesture-handler';

 <GestureHandlerRootView style={{width:'100%', height:'100%'}}>
.....your draggable list here
</GestureHandlerRootView>

This worked for me

marcosrdz avatar Jan 26 '22 15:01 marcosrdz