bug: only account for if the top of an elemnet is out of view
[apps/outliner/.git] / src / dom.ts
index 481c5edcb84a2c178c81c1cc5878a666fa9e0390..3ee623ba34774ca956c1353ebe1f39e6c67bbfbe 100644 (file)
@@ -3,7 +3,7 @@ export function isVisible(element: HTMLElement): boolean {
     return (
         rect.top >= 0 &&
         rect.left >= 0 &&
-        rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&     
+        rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&     
         rect.right <= (window.innerWidth || document.documentElement.clientWidth)
     );
 }