KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
318 stars 40 forks source link

iOS WebView + Dialog dim not working. #34

Closed taetae98coding closed 6 months ago

taetae98coding commented 7 months ago

I just use M3 Scaffold and androidx.compose.ui.window.Dialog but dim not working in ios

@Composable private fun WebViewDialog( uiState: MutableState, visibleState: MutableState, ) { if (visibleState.value) { Dialog( onDismissRequest = { visibleState.value = false }, ) { DialogContent( modifier = Modifier.fillMaxWidth(), uiState = uiState, visibleState = visibleState, ) } } }


![image](https://github.com/KevinnZou/compose-webview-multiplatform/assets/147542533/3000e6a4-f75b-4398-b45d-0383efde2041)
KevinnZou commented 7 months ago

Thanks for your feedback. If I understood correctly, you want to show a dialog above the WebView and it failed. However, in your screenshot, it seems that the dialog pops out successfully. Could you explain its current behaviour and your expected behaviour? Thanks!

taetae98coding commented 7 months ago

You can see webview and topbar.

Here is Android example. 111

KevinnZou commented 7 months ago

@taetae98coding Thank you for your explanation! I also reproduced the bug. After conducting some research, I think it is the bug caused by UIKitView. The WebView on the iOS side is implemented by WKWebView wrapped inside the UIKitView. I tried to replace WKWebView with UITextView and the problem still exists. 截屏2023-10-30 09 51 40

I also found a similar issue in Compose Multiplatform repo: https://github.com/JetBrains/compose-multiplatform/issues/3848.

I will submit this bug to JetBrains and wait for their solution. Thank you for your feedback.

KevinnZou commented 7 months ago

@taetae98coding I have submitted the issue https://github.com/JetBrains/compose-multiplatform/issues/3881

taetae98coding commented 7 months ago

@KevinnZou Thank you for your relply!!

taetae98coding commented 7 months ago

it is fixed compose 1.5.10

KevinnZou commented 7 months ago

it is fixed compose 1.5.10

Yes, I am waiting for the release of 1.5.10.

KevinnZou commented 6 months ago

It has been fixed in https://github.com/KevinnZou/compose-webview-multiplatform/releases/tag/1.7.0