question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't Click Android Button Inside TouchableWithoutFeedback

See original GitHub issue

Describe the bug

Can’t click the cast button on Android devices when nested inside TouchableWithoutFeedback

Versions:

  • RNGC Library Version: 3.3.0
  • Android Version (if applicable): 10

To Reproduce

<TouchableWithoutFeedback>
  <View>
    <CastButton style={{height: 40, width: 40}}/>
  </View>
</TouchableWithoutFeedback>

Expected behavior

Should be able to click the button and have the menu show up

Screenshots

Screenshot_20200623-091029

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
SimoneCarniocommented, Jan 29, 2021

Same problem, just find this solution:

replace

<TouchableWithoutFeedback onPress={() => { yourFunction(); }}>

with

<View onStartShouldSetResponder={ yourFunction} >

2reactions
redreceiptcommented, Jun 29, 2020

Excellent, thanks. I put in a workaround, not wrapping the whole screen anymore. Just a flexed view outside the cast button so not urgent. GitHub notifications@github.com wrote: “Oh you mean the whole screen is wrapped with Touchable. Gotcha.

I’m sorry I don’t have an answer for you right now but I’ll try to look into it.”

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native onPress with TouchableWithoutFeedback is not ...
I am just taking my initial step to get into the React Native world. But in this very early stage, I am having...
Read more >
TouchableWithoutFeedback - React Native
Importantly, TouchableWithoutFeedback works by cloning its child and applying responder props to it.
Read more >
Using KeyboardAwareScrollView and KeyboardAvoidingView ...
In React Native, you must take care of the scroll by using either the ... TextInput, StyleSheet, Text, TouchableWithoutFeedback, Button, ...
Read more >
Accessibility - Deco React Native Docs
In the above example, the TouchableWithoutFeedback is being announced by TalkBack as a native Button. accessibilityLiveRegion (Android) #. When components ...
Read more >
Accessibility · React Native
Native App Accessibility (iOS and Android) ... In the above example, we can't get accessibility focus separately on 'text one' and ... buttonText}>Press...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found