[v4] Initial index -1 not working on Android Only
See original GitHub issueBug
When using the -1
index to make sure that the sheet is closed on the initial render, the sheet works fine on IOS but not on android. Instead on android, the sheet renders a small portion at the bottom of the screen, which blocks interaction with contents outside the sheet.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.0.3 |
react-native | 0.63 |
react-native-reanimated | 2.2.0 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
Nothing big here, a simple example. Just set the index to -1
.
Describe what you expected to happen:
The sheet should be closed on initial render and only show when a button is pressed
Reproducible sample code
The snack code with the issue
https://snack.expo.dev/@aimensasi/bottom-sheet-v4-reproducible-issue-template
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:15 (5 by maintainers)
Top Results From Across the Web
4 reasons your z-index isn't working (and how to fix it)
Let's check out the first reason: 1. Elements in the same stacking context will display in order of appearance ...
Read more >Why does z-index not work? - Stack Overflow
The z-index property only works on elements with a position value other than static (e.g. position: absolute; , position: relative; , or position:...
Read more >Known issues with Android Studio and Android Gradle Plugin
This page tracks known issues with Android Studio Dolphin | 2021.3.1 and Android Gradle plugin ... Android Studio doesn't start after installing version...
Read more >z-index - CSS: Cascading Style Sheets - MDN Web Docs
The z-index CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger ...
Read more >Mobile-first Indexing Best Practices | Google Search Central
Discover what Google mobile-first indexing is and explore best practices designed to improve user experience in Google Search.
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
@gorhom - I am experiencing the same issue on a Physical device. Any help is greatly appreciated!
I am not sure that would help but will try and let you know.
Currently, my workaround is to do the following
This will cause the sheet to close, but only after a certain amount of mseconds.