From 1894fa6085e0f49a5c45b0677d0d71a9030e803c Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Tue, 2 Jul 2024 09:32:01 +0200 Subject: [PATCH] fix(NcReferenceWidget): pass elements to intersection observer Signed-off-by: DorraJaouad --- src/components/NcRichText/NcReferenceWidget.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NcRichText/NcReferenceWidget.vue b/src/components/NcRichText/NcReferenceWidget.vue index d4f0bcac78..fedbeb131b 100644 --- a/src/components/NcRichText/NcReferenceWidget.vue +++ b/src/components/NcRichText/NcReferenceWidget.vue @@ -72,9 +72,9 @@ export default { const widgetRoot = ref() const { width } = useElementSize(widgetRoot) - useIntersectionObserver(widgetRoot, () => { + useIntersectionObserver(widgetRoot, ([entry]) => { nextTick(() => { - isVisible.value = widgetRoot.value?.isIntersecting ?? false + isVisible.value = entry.isIntersecting }) })