jeremybarbet/react-native-modalize

swiping down to scoll to top in webview wrapped in modalize

mansoorameen opened this issue · 2 comments

Describe the bug:
the problem is when i try to scroll up(swipe down) in the web page, the modalize closes(this is the expected behaviour of modalize i believe), but how do I turn off that and swipe down close enable only on the hanlder?

Steps to reproduce:
run this code

     <Portal>
                                <Modalize ref={modalizeRef}
                                    onLayout={handleLayout}
                                    tapGestureEnabled={true}
                                >
                                    <WebView
                                        androidLayerType='software'
                                        ref={webViewRef}
                                        useWebKit={true}
                                        source={{ uri: openUrl }}
                                        style={{ height, opacity: 0.99 }}
                                    />
                                </Modalize>
                            </Portal>

Dependencies:
"react-native-modalize": "^2.1.1",
"react-native-portalize": "^1.0.7",
"react-native-webview": "^11.26.0",
"react-native-gesture-handler": "^2.8.0",

Hi @mansoorameen , did you find any solution for this ?

Hi @mansoorameen , did you find any solution for this ?

this fixed it for me

`
<Modalize

              ref={modalizeRef}

              onLayout={handleLayout}

              tapGestureEnabled={false}

              panGestureEnabled={false}

              scrollViewProps={{
                disableScrollViewPanResponder: false,
              }}

              modalStyle={{
                marginTop: globalStyles.deviceHeight * 0.1,
                marginBottom: -10,
              }}

            >

              <WebView

                ref={webViewRef}

                source={{ uri: openUrl }}

                style={{ height, opacity: 1, paddingBottom: 20 }}

                startInLoadingState={true}

              />

            </Modalize>

`