Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiping down to scoll to top in webview wrapped in modalize #473

Open
mansoorameen opened this issue Jan 16, 2023 · 2 comments
Open

swiping down to scoll to top in webview wrapped in modalize #473

mansoorameen opened this issue Jan 16, 2023 · 2 comments

Comments

@mansoorameen
Copy link

mansoorameen commented Jan 16, 2023

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",

@DmitryFt
Copy link

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

@mansoorameen
Copy link
Author

mansoorameen commented Dec 21, 2023

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>

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants