fix: restore pre-#3682 visibility semantics (#4376)

This commit is contained in:
Carson Sievert
2026-04-28 16:07:15 -05:00
committed by GitHub
parent e07298a728
commit 719f3c8b3b
5 changed files with 5 additions and 12 deletions

View File

@@ -859,9 +859,6 @@
return x2;
}
function isVisible(el) {
if (typeof el.checkVisibility === "function") {
return el.checkVisibility();
}
if (el.offsetWidth !== 0 || el.offsetHeight !== 0) {
return true;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -60,10 +60,6 @@ function getStyle(el: Element, styleProp: string): string | undefined {
}
function isVisible(el: HTMLElement): boolean {
if (typeof el.checkVisibility === "function") {
return el.checkVisibility();
}
// Fallback for browsers that don't support checkVisibility (Safari < 17.4)
if (el.offsetWidth !== 0 || el.offsetHeight !== 0) {
return true;
}