Open dappledore opened 3 months ago
Could you have a try with this sample?
@KevinnZou Is this Android only? The above is working Android but not on iOS. The box with vertical scroll seems to be the problem.
Has there been any updates on this? I'm trying to implement scroll away top app bar, so I need my WebView to be in a scrollable container for the nested scrolling behavior to work correctly. Works on Android, but as soon as I add .verticalScroll(rememberScrollState())
to the box containing my WebView, it doesn't load anything on iOS.
Here is my code, let me know if there's anything else I can do to help debug!
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(rememberTopAppBarState())
Scaffold(
topBar = {
CenterAlignedTopAppBar(
title = { Text(navComponent.title) },
scrollBehavior = scrollBehavior,
... )
},
...
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
content = { innerPadding ->
Box(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding)
.verticalScroll(rememberScrollState()) // if I comment this line out, the WebView is visible in iOS, else not
) {
val state: WebViewState = rememberWebViewState(url = navComponent.url)
WebView(
state = state,
modifier = Modifier
.fillMaxSize(),
)
}
}
Im using below to implement pull to refresh , this works on Android but on iOS its a blank Webview. If i remove
.verticalScroll(rememberScrollState()) line then the Webview is not blank however unable to pull to refresh.
Is there a way to get pull to refresh to work on iOS and Android.