-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Title: WebView Refreshing Automatically When Scrolling Nested ScrollView
Description:
I am experiencing an issue with my React Native application where a WebView inside a ScrollView is refreshing automatically when I scroll a nested ScrollView within the WebView.
Environment:
- React Native version:
"0.75.4", - react-native-webview version:
"^13.12.2" - Platform: [iOS/Android]
Steps to Reproduce:
- Create a
ScrollViewthat contains aWebView. - Inside the
WebView, include a nestedScrollView. - Scroll the nested
ScrollView. - Observe that the parent
ScrollView'sRefreshControlis triggered, causing theWebViewto refresh.
Expected Behavior:
The WebView should not refresh automatically when scrolling the nested ScrollView. The RefreshControl should only activate when the user scrolls the outer ScrollView.
Actual Behavior:
Scrolling the nested ScrollView inadvertently triggers the refresh behavior of the parent ScrollView, leading to an unwanted refresh of the WebView.
Code Snippet:
<ScrollView
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={onRefresh}
enabled={routeName !== 'Journal'}
/>
}
>
<WebView
source={{ uri: HOME_URL }}
injectedJavaScript={injectedJavaScript}
// Other props...
/>
</ScrollView>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels