Release 1.1.1
🚀 react-native-sized-webview v1.1.1
This release improves auto-height reliability for real-world HTML content rendered inside React Native WebView, especially rich-text/editor output with links, paragraphs, trailing empty blocks, non-breaking spaces, and platform-specific WebView layout quirks.
🐛 Fixed
- Fixed cases where valid HTML content could be visually cut off because the injected height bridge undercounted the rendered document height.
- Improved handling of editor-generated trailing nodes such as
<p><br></p>without accidentally treating visible content as empty. - Fixed meaningful text detection for non-breaking spaces (
), which can render visible layout content but was previously treated like empty whitespace byString.prototype.trim().
✨ Improved
- Added a bounded rendered-content measurement pass that inspects actual DOM layout bounds as a fallback to
scrollHeight,offsetHeight, andclientHeight. - Height measurement now considers the wrapper,
body, andhtmlelements instead of relying only on the internal wrapper. - Improved resilience for margin collapsing, overflow, and WKWebView cases where standard height properties may underreport content size.
- Added a scan cap to keep measurement graceful on large documents and avoid expensive unbounded DOM traversal.
- Simplified the generated TypeScript declaration for the injected bridge to expose it as a
stringinstead of emitting a very large literal type.
💡 Why It Matters
Some WebView content can render beyond the height reported by common DOM properties. This is especially noticeable with rich HTML from CMS/editor sources, where trailing paragraphs, links, non-breaking spaces, and collapsed margins are common. The new measurement strategy follows the browser's rendered layout more closely, reducing clipped text while keeping the algorithm conservative and performant.