Skip to content

Commit de5ffe6

Browse files
committed
fix: skip position:fixed elements in spatial index
1 parent a34a57a commit de5ffe6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-grab/src/utils/element-at-point-index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const buildElementAtPointIndex = (): void => {
4747
const boundingRect = entry.boundingClientRect;
4848
if (boundingRect.width === 0 || boundingRect.height === 0) continue;
4949
if (!isValidGrabbableElement(targetElement)) continue;
50+
if (getComputedStyle(targetElement).position === "fixed") continue;
5051

5152
accumulatedElements.push({
5253
element: targetElement,

0 commit comments

Comments
 (0)