Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Open
juanpablogd opened this issue Jul 13, 2020 · 13 comments
Open

Comments

@juanpablogd
Copy link

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

@Xinor
Copy link

Xinor commented Jul 17, 2020

+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.

@ronork
Copy link

ronork commented Jul 22, 2020

+1
Long Press required..

@giaset
Copy link

giaset commented Jul 24, 2020

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

@tomByrer
Copy link

tomByrer commented Aug 7, 2020

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?

@umangmaurya
Copy link

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

@FrankieJLyons
Copy link

@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.

@mqtik
Copy link

mqtik commented Sep 29, 2020

Having this problem as well.
Is this still maintained?

@nachozullo
Copy link

Same problem here using Expo SDK 39

@mqtik
Copy link

mqtik commented Dec 9, 2020

I sent a PR about this..

@afilp
Copy link

afilp commented Jan 12, 2021

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

@afilp
Copy link

afilp commented Jan 12, 2021

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
Copy link

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

@ozgurkaragoz
Copy link

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests