google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.42k stars 597 forks source link

[WebView] Doesn't save state when recycled in a LazyColumn #1734

Closed nickboris closed 10 months ago

nickboris commented 10 months ago

Describe the bug

Webviews in compose do not seem to save state when they are in a LazyColumn. This results in poor UX, because every time a user scrolls away and back to the webview item, it has to completely reload. This disruptive behavior was called out in this post: https://github.com/google/accompanist/pull/1557 that seemed to have fixed the issue for a similar issue (screen orientation change). It seems to have gone unnoticed.

Wanted to create a formal report for this issue so that it gets on your radar.

Expected behavior

WebView state is cached when it is recomposed within the context of a LazyList. The webview should not be completely reloaded when the user scrolls away from the item (recycled) and back (re-enters composition)

bentrengrove commented 10 months ago

Unfortunately accompanist WebView has been deprecated and we won't be making any additional updates to it. Thanks for the report but I will have to close this issue.

anilateapp commented 7 months ago

Why did webview stop continuing to edit, it's not finished, because after switching between tabs it is recreated, in fact all that was done was saving the scroll, and since there was an error and the strange behavior remained, in swiftui webview works stably anyway, I don't understand why they stopped breaking up accompanist WebView