Skip to content

Commit 8eb70ca

Browse files
committed
fix(ui): check if click by keydown
1 parent 2486b12 commit 8eb70ca

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/ui/src/components/root/Root.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ export function DRoot(props: DRootProps): JSX.Element | null {
8383
windowRef,
8484
'click',
8585
(e) => {
86-
ROOT_DATA.clickEvent = {
87-
time: performance.now(),
88-
e,
89-
};
86+
// Check if click by keydown.
87+
if (!(e.clientX === 0 && e.clientY === 0)) {
88+
ROOT_DATA.clickEvent = {
89+
time: performance.now(),
90+
e,
91+
};
92+
}
9093
},
9194
{ capture: true }
9295
);

0 commit comments

Comments
 (0)