Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

onPress props : TouchableOpacity is not working in the latest version RN-0.71.1 #36157

Closed
98rahul opened this issue Feb 15, 2023 · 5 comments
Closed

Comments

@98rahul
Copy link

98rahul commented Feb 15, 2023

New Version

0.71.1

Old Version

0.63.4

Build Target(s)

Android

Output of react-native info

onPress prop is not working..
<View style={[styles.linkStyle, { backgroundColor: "green" }]}> <TouchableOpacity onPress={() => { console.log("onPress"); }} > <Text>Use Registered Alternate Number</Text> </TouchableOpacity>

Issue and Reproduction Steps

migrate to the latest RN-0.71.1

@98rahul 98rahul added Needs: Triage 🔍 Type: Upgrade Issue Issues reported from upgrade issue form labels Feb 15, 2023
@98rahul 98rahul changed the title TouchableOpacity is not working in the latest version RN-0.71.1 onPress props : TouchableOpacity is not working in the latest version RN-0.71.1 Feb 15, 2023
@98rahul
Copy link
Author

98rahul commented Feb 15, 2023

due to the layout had fixed height
now,issue been resolved

@98rahul 98rahul closed this as completed Feb 15, 2023
@SakeFabi
Copy link

Hello @98rahu,l how did you fix? I cannot run it anymore after an upgrade to the newest version of RN.

@98rahul
Copy link
Author

98rahul commented Feb 28, 2023

Hello @98rahu,l how did you fix? I cannot run it anymore after an upgrade to the newest version of RN.

check height of layout screen (TouchableOpacity expected to be under the height define in wrapper View/ScrollView.. ).

@avoloshko
Copy link

@98rahul what was the problem? I noticed that with 0.71.4 TouchableOpacity sometimes ignores onPress. It's somewhat inconsistent... I have not ideas.

@98rahul
Copy link
Author

98rahul commented Mar 14, 2023

@98rahul what was the problem? I noticed that with 0.71.4 TouchableOpacity sometimes ignores onPress. It's somewhat inconsistent... I have not ideas.

inspect the View wrapper(parent) of TouchableOpacity , make sure it should under the fixed height( probably you had fixed the layout height).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants