Closed maxckelly closed 3 years ago
I was getting this bug as well on any iOS simulator and a physical iPhone 6. Was using present()
hook inside a <BottomSheetModalProvider/>
. Unfortunately, I've been ignoring the issue and continued development using the Android simulator.
thanks @maxckelly for submitting this issue, could you provide a reproducible sample code that can run directly from /example
, thanks
Hey @gorhom , I'm not the OP, but since I've been experiencing this same issue, I've created a stripped down version of my app for you to take a look at here. I know its not something that runs from /example
, which works fine on my end, but maybe there is a problem relating with Expo.
Quick instructions: yarn install
and expo start
, then press either a
to launch Android or i
to launch iOS.
Here's two GIFs of what I'm seeing from both platforms:
Android: Working as intended.
iOS: Not working as intended.
Edit: Let me know if this is a different bug, since the setup is a bit different, so that I can open up a new issue.
Thanks for the response @gorhom - Planning on getting to this over the weekend. :)
hi @maxckelly, @MarcusOy I just released Alpha 5, it should fix this issue, please try it and let me know ,, thanks
yarn add @gorhom/bottom-sheet@2.0.0-alpha.5
also check out the new documents website ( still in progress ) 🎉
@gorhom Hi! I found problem after updating to the Expo SDK 49 Modal windows began to work chaotically: on ios it opens perfectly both in dev mode and in prod On Android, they work perfectly in dev mode and absolutely do not work in production mode. I will present the screen recordings below Version of "@gorhom/bottom-sheet": "^4.4.5" DEV: PROD:
Apparently, this is a bug of the library itself when building with this version of the SDK. I also upgraded to sdk version 50, but that didn't help either.
Judging by the articles on the Internet, many have already encountered such a problem and recommended using AccessibilityInfo.isReduceMotionEnabled() from 'react-native' or useReducedMotion() from 'react-native-reanimated' and using the result in BottomSheetModal prop animateOnMount. So far, this method has not been tested
Also found one intersting bug, in my opinion, the reason is in the library This effect found only on andoid, on ios it work absolutely correct
When the bottomSheetModal is maximized (without reducing it by touching a finger), the content in the form of svg icons is displayed incorrectly (the image is distorted as seen in the screenshot). However, when I use my finger to slightly reduce the size of the window, starting to minimize it, the svg begins to display clearly, as it should be.
Display when the window is minimized by finger:
Display without user action
@Andrey123815 Hey! Did you find any work around? I am facing the same problem, mostly on android devices where the bottom sheet fails to open at specified snap points.
@Andrey123815 Hey! Did you find any work around? I am facing the same problem, mostly on android devices where the bottom sheet fails to open at specified snap points.
Unfortunately no. So far, I have not found confirmed problem solution. Hope library author can fix this in next releases or reply us)
I've noticed that if you have only one snapPoint it gets randomly closed on Android (emulator and device). To fix that, instead of const snapPoints = ['90%'];
I've changed to const snapPoints = ['90%', '90%'];
. Unsure if it's related tho.
Bug
Thanks for taking the time to look at this.
In production it seems that the bottom modal sheet flicks and doesn't open. If you look at my video attached you will see that the modal flickers slightly down the bottom sometimes it opens fully for a brief half second then closes. I've checked if the dismiss call is firing on open which it's not.
Any help would be greatly appreciated.
UPDATE: I'm now calling
present()
in auseFocusHook
and the modal is still flickering down the bottom. It appears half way up the screen for half a second then flickers and goes away.Environment info
iOS - Test Flight
Steps To Reproduce
1.Press on button to trigger present() Describe what you expected to happen: 1.Modal to open
Reproducible sample code
BottomSheet component - Called in screen
Screen - Parent