react-native-swipe-gestures icon indicating copy to clipboard operation
react-native-swipe-gestures copied to clipboard

Cannot detect any swipes

Open tibbus opened this issue 7 years ago • 10 comments

Cannot detect any swipes on ios simulator / react-native 0.44.0

tibbus avatar Jun 01 '17 18:06 tibbus

hmm, it works but for some reason doesn't work on react modal

tibbus avatar Jun 01 '17 20:06 tibbus

Doesn't work for react modal.

dzpt avatar Sep 23 '17 05:09 dzpt

It s an open issue on react native for detecting the swipes inside the Modal. https://github.com/facebook/react-native/issues/14295#issuecomment-315777517

tibbus avatar Sep 24 '17 06:09 tibbus

+1 still not working on .49

alzalabany avatar Oct 20 '17 09:10 alzalabany

+1 still not working on 0.52.0

Yessengerey avatar Apr 02 '18 15:04 Yessengerey

workaround is to wrap modal content with Touchable component

   <TouchableWithoutFeedback>
      <View>
        
        // The component's content goes here
         <GestureRecognizer
                onSwipe={(direction, state) => this.onSwipe(direction, state)}
                onSwipeUp={(state) => this.onSwipeUp(state)}
                onSwipeDown={(state) => this.onSwipeDown(state)}
                onSwipeLeft={(state) => this.onSwipeLeft(state)}
                onSwipeRight={(state) => this.onSwipeRight(state)}
                config={config}
          >
                <Text>{this.state.myText}</Text>
                <Text>onSwipe callback received gesture: {this.state.gestureName}</Text>
          </GestureRecognizer>

      </View>
    </TouchableWithoutFeedback>

alzalabany avatar Apr 11 '18 00:04 alzalabany

It't old and not working in my phone.

hoangvuanhdevelopervn avatar Apr 18 '18 08:04 hoangvuanhdevelopervn

wrapping with Touchable didn't work for me inside modal ?

any update since ? thank you

alainib avatar Mar 18 '19 12:03 alainib

I had trouble with ImageBackground in Modal. Work for me well, but TouchableWithoutFeedback was inside GestureRecognizer, as wrapper of ImageBackground.

BuraVadim avatar Sep 05 '19 14:09 BuraVadim

I had trouble with ImageBackground in Modal. Work for me well, but TouchableWithoutFeedback was inside GestureRecognizer, as wrapper of ImageBackground.

Thanks @BuraVadim - your fix worked for me as well. Working code below:

<GestureRecognizer
      onSwipeUp={() => {}}
      config={config}
    >
      <TouchableWithoutFeedback>
        <View>
          <FontAwesomeIcon
            icon={faAngleDoubleUp}
            style={{ color: Colors.yellow.medium, margin: 10 }}
            size={20}
          />
          <Text style={[styles.h3, { color: Colors.yellow.medium }]}>
            Text goes here
          </Text>
        </View>
    </TouchableWithoutFeedback>
</GestureRecognizer>

lahmud avatar Jun 14 '20 17:06 lahmud