Nested Touchables activate parent Touchable and break Flexbox
See original GitHub issueDescription
- When nesting one
TouchableOpacity
inside another and pressing it, the parentTouchableOpacity
is activated as well. [Android] Flexbox
flex
seems to be broken with nestedTouchableOpacity
[Android, IOS]- When wrapping the nested
TouchableOpacity
inside aView
withflex:1
, theTouchableOpacity
disappears [Android, IOS] (when adding a padding, theTouchableOpacity
seems to appear from the top (see snack)??)
Screenshots
Steps To Reproduce
See Snack
Expected behavior
The rngh TouchableOpacity
should behave like the RN one as seen in the snack.
Actual behavior
Flexbox and pressbehavior is broken
Snack or minimal code example
https://snack.expo.dev/@expoco2/bugs-in-rngh
Package versions
expo: sdk 43.0.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Nested Flexbox Breaking Parent - Stack Overflow
I'm having an issue where it appears that I can have two levels (vertical columns -> horizontal rows), but if I try to...
Read more >Typical use cases of flexbox - CSS: Cascading Style Sheets
In this guide, we will take a look at some of the common use cases for flexbox — those places where it makes...
Read more >A Complete Guide to Flexbox | CSS-Tricks
This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex ...
Read more >Understanding Flexbox: Everything you need to know
To use the Flexbox model, you must make a parent element a flex container (AKA ... It lets the flex items break unto...
Read more >CSS Flex positioning gotchas: child expands to more than the ...
It seems like the parent does not control the width anymore. HTML; CSS. Result; Skip Results Iframe.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re using vanilla RN, don’t forget to wrap the application component with
GestureHandlerRootView
(and keep in mind that it will behave just as aView
would, meaning you might want to addstyle={{ flex: 1 }}
to it to make it fill the screen). As for the message you mentioned, it’s nothing to worry about. It was supposed to nudge people to migrate to the new API.@j-piasecki Great, thank you. I was not able to replicate it and will now work on implementing version 2.3.0 in my production app. If I come across the bug again, I will reopen this issue. Until then, this issue is closed. Thank you for your support! 😃