fix(webui): apply latest offscreen visibility notification (NAN-333)

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-22 15:08:29 +08:00
1 parent be43d2a5f8
commit 872a83340d
2 files changed
+10 -2

No files matched your search

@@ -612,7 +612,8 @@ const ThreadDisplayUnit = memo(function ThreadDisplayUnit({
useEffect(() => {
const element = elementRef.current;
if (!element || !deferOffscreenRender || interacted || typeof IntersectionObserver === "undefined") return;
const observer = new IntersectionObserver(([entry]) => {
const observer = new IntersectionObserver((entries) => {
const entry = entries[entries.length - 1];
if (!entry) return;
if (!entry.isIntersecting) {
const height = element.getBoundingClientRect().height;