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.

Nested Touchables activate parent Touchable and break Flexbox

See original GitHub issue

Description

  1. When nesting one TouchableOpacity inside another and pressing it, the parent TouchableOpacity is activated as well. [Android]
  2. Flexbox flex seems to be broken with nested TouchableOpacity [Android, IOS]
  3. When wrapping the nested TouchableOpacity inside a View with flex:1, the TouchableOpacity disappears [Android, IOS] (when adding a padding, the TouchableOpacity 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:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
j-piaseckicommented, Mar 3, 2022

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 a View would, meaning you might want to add style={{ 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.

0reactions
alexco2commented, Mar 3, 2022

@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! 😃

Read more comments on GitHub >

github_iconTop 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 >

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