From fee68f7bd41abe7295cbeaa58de9fe5f5f4470e6 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 63bcaf0534..481202503a 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 }) })