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

Android WebView is not disposed when Composable is disposed #216

Open
Rumpel1984 opened this issue Sep 3, 2024 · 2 comments
Open

Android WebView is not disposed when Composable is disposed #216

Rumpel1984 opened this issue Sep 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Rumpel1984
Copy link

This issue can only be ovserved in Android.

When you have multiple screens with WebView or navigate back to a composable with a WebView, the zoom is not working anymore.
It looks like the Android WebView is not properly disposed of when the multiplatform WebView is disposed and therefore not reinitited when opening the second multiplatform WebView.
At lease the Android WebView factory is only called when the first multiplatform WebView is opened, but not when navigating to any other WebView.

It might be related to that compose-navigation 2.8.0-alpha* version is not supported yet, but I can't confirm that.

I created a test app: https://github.com/Rumpel1984/ComposeWebViewMultiplatformZoomTest
CMP version - 1.6.11
navigation-compose - 2.8.0-alpha09
kotlin - 2.0.20

The zoom is working properly the first time you open screen with a WebView.
But as soon as you open another one, or return to the same WebView, it doesn't work anymore.

@KevinnZou
Copy link
Owner

Please try out the latest release, version 1.9.40-alpha01.

@KevinnZou KevinnZou self-assigned this Sep 11, 2024
@KevinnZou KevinnZou added the enhancement New feature or request label Sep 11, 2024
@Rumpel1984
Copy link
Author

Unfortunately this is not fixing the issue.
It still only works when the WebView is called the first time.

But I could confirm the issue is only in Andorid.
iOS zoom works when switching screens and returning.

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

No branches or pull requests

2 participants