Tencent IMWeb Frontend Team
Jun 6, 2022 · Frontend Development
Detecting Dynamic Content Height for a “Show More” Button in React
This article explores several techniques—including MutationObserver, IntersectionObserver, ResizeObserver, onload listeners, and an iframe hack—to reliably detect when a rich‑text container with images exceeds a maximum height so a "show more" button can be displayed.
DOMIntersectionObserverMutationObserver
0 likes · 11 min read