@datocms/content-link
Advanced tools
+1
-1
| { | ||
| "name": "@datocms/content-link", | ||
| "version": "0.3.17", | ||
| "version": "0.3.18", | ||
| "description": "Lightweight library for DatoCMS visual editing overlays and content links.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+11
-4
@@ -210,8 +210,15 @@ import { type Options, compute as computeScrollIntoView } from 'compute-scroll-into-view'; | ||
| const parent = el.parentElement; | ||
| if (parent) { | ||
| return isElementVisible(parent); | ||
| return isAncestorVisible(el.parentElement); | ||
| } | ||
| function isAncestorVisible(el: HTMLElement | null): boolean { | ||
| if (!el) return true; | ||
| const style = window.getComputedStyle(el); | ||
| if (style.display === 'none' || style.visibility === 'hidden' || style.opacity === '0') { | ||
| return false; | ||
| } | ||
| return true; | ||
| return isAncestorVisible(el.parentElement); | ||
| } | ||
@@ -218,0 +225,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
680314
0.23%6607
0.18%