react-native-autoheight-webview
react-native-autoheight-webview copied to clipboard
Cannot read properties of undefined (reading 'getBoudningClientRect')
Bug description: Upon rendering the WebView using a uri
source, an error pops up Cannot read properties of undefined (reading 'getBoudningClientRect')
In WebView I'm using server-rendered react with nestJS. Upon examining the code I see that the package is trying to wrap each individual element in a wrapper
div, but in this case the wrapper
is undefined. This error only happens few seconds after the WebView has been rendered.
Environment:
- OS: Android
- OS version: Android 12
- react-native version: 0.68.2
- react-native-webview version: 11.23.0
- react-native-autoheight-webview version: 1.6.4
Please provide your uri source.
Please provide your uri source.
As of now, it is a local endpoint. Will let you know once it's accessible. But here's what's happening in the uri:
~~An editor based on lexical (https://playground.lexical.dev/) which uses ContentEditable
under the hood (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable)~~
I was able to reproduce the error on a page without ContentEditable
by triggering a height update. So more likely an issue with next.js
? Also, this error doesn't affect the normal function - autoheight still works well despite of the error showing. The error is suppressed on production environment.