bits-ui 2.15.6 → 2.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -108,10 +108,10 @@ class SelectBaseRootState {
|
|
|
108
108
|
if (!this.viewportNode)
|
|
109
109
|
return false;
|
|
110
110
|
const nodeRect = node.getBoundingClientRect();
|
|
111
|
-
const isNodeFullyVisible = nodeRect.right
|
|
112
|
-
nodeRect.left
|
|
113
|
-
nodeRect.bottom
|
|
114
|
-
nodeRect.top
|
|
111
|
+
const isNodeFullyVisible = nodeRect.right <= viewportRect.right &&
|
|
112
|
+
nodeRect.left >= viewportRect.left &&
|
|
113
|
+
nodeRect.bottom <= viewportRect.bottom &&
|
|
114
|
+
nodeRect.top >= viewportRect.top;
|
|
115
115
|
return isNodeFullyVisible;
|
|
116
116
|
});
|
|
117
117
|
}
|