-
Notifications
You must be signed in to change notification settings - Fork 163
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
React Native Webview auto Height not display large content in flatlist [Android] #241
Comments
same issue, please check it |
@ViktorOsadchyi |
@iou90 I used style={{ opacity: 0.99 }} and it didn't work for me. I have never been able to find a solution to this problem with this library. |
@ViktorOsadchyi Can you test with the same conditions as above? |
Just a heads up. I'm seeing the same issue on Android, although we're using https://github.com/formidable-webview/webshell for autoheight, which works similar to this library. The issue is most likely upstream in react-native-webview. I see this in Flipper which may be relevant: Possibly related: https://stackoverflow.com/questions/62080137/android-webview-does-not-display-web-page-even-though-the-page-has-successfully |
I solved my problem using the react-native-webview library, on which react-native-autoheight-webview is built It seems that this solved the problem and now the content is always displayed. |
@ViktorOsadchyi this issue may not always reproduce. It's possible something you're doing makes it less likely to occur, but it will still occur in other cases. I'm doing some manual height adjustments as well and not using this library, and I have a case where I can always trigger this bug. |
i fixed this with removeClippedSubviews={false} on flatlist, and overflow: 'hidden' on the webview style |
DON'T USE THIS LIBRARY. Lib can be replaced by WebView injectedJavaScript.
It automatically adjusts to fit the HTML content height. For more information, please refer to the following. |
Your comment did not work either. It does do SOMETHING but it is not accurate at all. It's not your fault, but the height value is wrong. |
@choijiho0021 this worked like a charm |
Bug description:
We use multiple webview components on one screen along with native listings in flatlist.
On iOS, there are no problems with display and performance. However, on Android, we encountered a crash when displaying several webview components. This issue was fixed by adding
renderToHardwareTextureAndroid
,androidHardwareAccelerationDisabled
andstyle={{ opacity: 0.99 }}
We also noticed that large content is no longer displayed if the webview component is inside a flatlist
If you use androidHardwareAccelerationDisabled={false}, the content is sometimes displayed, but the behavior gets even weirder because sometimes the content still disappears.
At the same time, the height of the component is correctly calculated and the scrollbar looks correct, but instead of content, there is emptiness
Source:
Screenshots/Videos:
Environment:
The text was updated successfully, but these errors were encountered: