Skip to content

Commit

Permalink
Add Clarification to Docs - Views are not clickable if parent has hei…
Browse files Browse the repository at this point in the history
…ght of 0 (facebook#2537)

* views are not clickable if parent has height of 0

The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.

* improve punctuation

* remove notice from Handling Text Input

we could consider adding additional warning about this limitation in https://reactnative.dev/docs/style

* Adding clarification in Docs Style

In some cases React Native does not match how CSS works on the web
facebook/react-native#25441 (comment)

* Moving the notes to the "Know Issues" section at the end of each page

facebook#2537 (review)
  • Loading branch information
fabOnReact authored Mar 10, 2021
1 parent 39ebc94 commit da50665
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/handling-touches.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,7 @@ const styles = StyleSheet.create({
## Scrolling and swiping

Gestures commonly used on devices with touchable screens include swipes and pans. These allow the user to scroll through a list of items, or swipe through pages of content. For these, check out the [ScrollView](scrollview.md) Core Component.

## Known issues

- [react-native#29308](https://github.com/facebook/react-native/issues/29308#issuecomment-792864162): The touch area never extends past the parent view bounds and on Android negative margin is not supported.
4 changes: 4 additions & 0 deletions docs/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ One common pattern is to make your component accept a `style` prop which in turn
There are a lot more ways to customize the text style. Check out the [Text component reference](text.md) for a complete list.

Now you can make your text beautiful. The next step in becoming a style expert is to [learn how to control component size](height-and-width.md).

## Known issues

- [react-native#29308](https://github.com/facebook/react-native/issues/29308#issuecomment-792864162): In some cases React Native does not match how CSS works on the web, for example the touch area never extends past the parent view bounds and on Android negative margin is not supported.

0 comments on commit da50665

Please sign in to comment.