Skip to content

Commit cf3f567

Browse files
committed
fix lint and test
1 parent 03c23c4 commit cf3f567

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/@react-aria/interactions/src/usePress.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
focusWithoutScrolling,
2121
getOwnerDocument,
2222
getOwnerWindow,
23-
getRootNode,
2423
isMac,
2524
isVirtualClick,
2625
isVirtualPointerEvent,
@@ -435,7 +434,7 @@ export function usePress(props: PressHookProps): PressResult {
435434
state.isPressed = true;
436435
state.isOverTarget = true;
437436
state.activePointerId = e.pointerId;
438-
state.target = e.nativeEvent.composedPath()[0] as FocusableElement;
437+
state.target = e.currentTarget as FocusableElement;
439438

440439
if (!isDisabled && !preventFocusOnPress) {
441440
focusWithoutScrolling(state.target);
@@ -1000,7 +999,7 @@ export function nodeContains(
1000999
otherNode: Node | null | undefined
10011000
): boolean {
10021001
if (!node || !otherNode) {
1003-
return false;
1002+
return false;
10041003
}
10051004

10061005
let currentNode: HTMLElement | Node | null | undefined = otherNode;

0 commit comments

Comments
 (0)