Some Sites's height is 0
Bug description: Height is always 0 To Reproduce: Test below Url Source (static HTML or url): url : https://recruit.kccworld.info/menu/menuDetail.do?lSeq=885
<AutoHeightWebView
source={{uri: https://recruit.kccworld.info/menu/menuDetail.do?lSeq=885}}
style={{width: Dimensions.get('window').width - 40}}
scrollEnabled={true}
viewportContent={'width=device-width, user-scalable=no'}
onSizeUpdated={(size) => {
console.log(size);
}}
/>
Expected behavior: Height is not 0 and draw all contents. Environment:
- OS: Android
- OS version: 9
- react-native version: 0.63.3
- react-native-webview version: 10.10.2
- react-native-autoheight-webview version: 1.5.7
Same issue, looks like the height is calculated correctly and then again to 0 :
ok so for me if the height is equal or greater than 924px, the content is hidden, if I set it to 923 or less I see the content. This number depend on device viewport...
same issue. for me content becomes invisible after 872
[Solved] Solved by adding prop androidLayerType="hardware"
[Solved] Solved by adding prop
androidLayerType="hardware"
Still same though I added this prop... :(
Make sure that you are not calling stopLoading() while loading html content.
[Solved] Solved by adding prop
androidLayerType="hardware"Still same though I added this prop... :(
Dear @oikkoikk
Please tell me if I can fix this error. How to fix it
@jihokim2 https://recruit.kccworld.info/menu/menuDetail.do?lSeq=885 shows 404 now. @oikkoikk Please provide source html/uri.
@iou90 I am having this issue as well. It only happens when I first open that screen though. To provide context, I am using this to show some local HTML, and that can change as the user clicks what is essentially a "Next" button.
Whenever the HTML changes, then yes, the Auto-Height part triggers and works amazingly. But I cannot for the life of me get this to auto-height that first initial time opening screen.
Any direction or insight would be appreciated.
I fixed it by adding minHeight:
<AutoHeightWebView
style={{ minHeight: 1 }}
...
/>