react-native-bottom-sheet: [v4] [v2] BottomSheetScrollView does not scroll to bottom occasionally.

Bug

BottomSheetScrollView does not scroll to end occasionally. As far as the pattern I observed it does it when you drag it up slowly to the second snapPoint and then to third, then when you scroll it, it doesn’t scroll to bottom. But after mount if you drag it quickly, directly to last or third snapPoint it scrolls to bottom just fine.

Environment info

Library Version
@gorhom/bottom-sheet 4.4.7
react-native 0.72.1
react-native-reanimated 3.4.2
react-native-gesture-handler 2.12.0

Steps To Reproduce

1.A simple BottomSheet with BottomSheetScrollView inside it. 2. With static snapPoints : const snapPoints = useMemo(() => [‘60%’, ‘88%’, ‘100%’], []); 3. Drag the BottomSheet slowly upwards, the BottomSheetScrollView will get stuck at a certain height.

Describe what you expected to happen:

1.BottomSheetScrollView should always scroll to the bottom of the content

<BottomSheet
            ref={bottomSheetRef}
            snapPoints={snapPoints}
            index={0}
            handleComponent={() => null}
            onChange={handleSheetChanges}
            backgroundComponent={props => <BottomSheetBackground {...props} />}
            handleIndicatorStyle={{
                backgroundColor: 'rgba(235, 236, 240, 1)',
            }}>
            <BottomSheetScrollView
                    showsVerticalScrollIndicator={false}
                    style={{ zIndex: 1, flex: 1 }}
                >
                    <Pressable>
                        {props.children}
                    </Pressable>
                <BottomSheetScrollView>
</BottomSheet>

https://github.com/gorhom/react-native-bottom-sheet/assets/31616730/be9d5c85-fba3-4036-9dd8-779ef9496b98

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 3
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@ils-anwarshah yeah this bug is only on android. But we don’t have to reload the app to make it go. Just go back to the previous screen and its gone.

I am having the same issues in Android, but it is working perfectly fine on iOS devices. Sometimes bottomSheetScrollView gets stuck and does not allow me to scroll Then I have to reload the whole application again and it works.

@ibraheem88 @ils-anwarshah could you provide repo example using this template https://snack.expo.io/@gorhom/bottom-sheet-v4-reproducible-issue-template

I have uploaded the code into this repo please check

@ibraheem88 @gorhom I think it is working fine after updating the library to the latest version…

Can’t seem to figure out what is causing it to get stuck at a certain height, also it is scrollable up but not down. Maybe the libraries like reanimated or gesture handler have been causing the issue.

@fjmorant Sadly i tried even older versions but the error was still there. Hope it gets fixed soon.

@ils-anwarshah yeah this bug is only on android. But we don’t have to reload the app to make it go. Just go back to the previous screen and its gone.

Thanks for the reply. But this is the major bug for Android users I have created the bottom sheet at the homepage of my Application. so there is no previous screen after login to go back. once the user logs In successfully, it will land on the homepage automatically until the user logs out. that is why I need to reload the whole application. please share the solution if you find any. Simulator Screenshot - iPhone 13 - 2023-09-02 at 19 04 33