react-native-really-awesome-button icon indicating copy to clipboard operation
react-native-really-awesome-button copied to clipboard

"onPress" event only fired when I hold the button and not when touched

Open juanpablogd opened this issue 3 years ago • 13 comments

"onPress" event only fired when I hold the button and not when touched

juanpablogd avatar Jul 13 '20 05:07 juanpablogd

+1

"react": "16.13.1" "react-native": "0.63.0" "react-native-really-awesome-button": "1.6.0"

edit: Fixed the issue when the delayPressIn and delayPressOut properties of the TouchableWithoutFeedback component in index.js were set to 0. I thought it might be helpful in solving the problem.

Xinor avatar Jul 17 '20 18:07 Xinor

+1 Long Press required..

ronork avatar Jul 22 '20 22:07 ronork

Same issue here -- can it be because of a change in React Native 0.63?

giaset avatar Jul 24 '20 17:07 giaset

edit: Fixed the issue when the delayPressIn and delayPressOut properties of the TouchableWithoutFeedback component in index.js were set to 0. I thought it might be helpful in solving the problem.

Tested to see if there were accidental double-clicks after this change?

tomByrer avatar Aug 07 '20 04:08 tomByrer

Fixed this issue use -- @umangmaurya/react-native-really-awesome-button

umangmaurya avatar Aug 19 '20 13:08 umangmaurya

@umangmaurya using your fork, I get the following warning:

Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property nativeEvent on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.

FrankieJLyons avatar Sep 22 '20 13:09 FrankieJLyons

Having this problem as well. Is this still maintained?

mqtik avatar Sep 29 '20 17:09 mqtik

Same problem here using Expo SDK 39

nachozullo avatar Nov 10 '20 14:11 nachozullo

I sent a PR about this..

mqtik avatar Dec 09 '20 02:12 mqtik

I am afraid that this library may not be maintained? Are there any forks that address this issue? Thanks!

afilp avatar Jan 12 '21 02:01 afilp

I even tried to use TouchableOpacity as a parent of the button, it did not work.

Then I used "absolute" styling and while I do see it above the button, the "press" does not work:

<TouchableOpacity
        disabled={disabled}
        onPress={onPress}
        style={{
          position: 'absolute',
          zIndex: 3, // works on ios
          elevation: 3, // works on android
          width: 100,
          height: 100,
          flex: 1,
          margin: 3,
          backgroundColor: 'red',
          ...style,
        }}
      >
        <Text>test</Text>
      </TouchableOpacity>
``` 

As if the button disables all events.

afilp avatar Jan 12 '21 03:01 afilp

I even tried to use TouchableOpacity as a parent of the button, it did not work.

Then I used "absolute" styling and while I do see it above the button, the "press" does not work:

<TouchableOpacity
        disabled={disabled}
        onPress={onPress}
        style={{
          position: 'absolute',
          zIndex: 3, // works on ios
          elevation: 3, // works on android
          width: 100,
          height: 100,
          flex: 1,
          margin: 3,
          backgroundColor: 'red',
          ...style,
        }}
      >
        <Text>test</Text>
      </TouchableOpacity>

As if the button disables all events.

@umangmaurya/react-native-really-awesome-button use this fork

umangmaurya avatar Jan 12 '21 06:01 umangmaurya

Just use "react-native-really-awesome-button": "1.3.0" version, it worked!

ozgurkaragoz avatar Sep 02 '22 21:09 ozgurkaragoz