Skip to content

Commit

Permalink
update shouldIntercept parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
m5r committed Dec 13, 2024
1 parent 4e8f147 commit 61b1cf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/shouldIntercept.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default function shouldIntercept(event: MouseEvent | KeyboardEvent): boolean {
export default function shouldIntercept(event: MouseEvent | KeyboardEvent | import('react').MouseEvent<Element>): boolean {
const isLink = (event.currentTarget as HTMLElement).tagName.toLowerCase() === 'a'
return !(
(event.target && (event?.target as HTMLElement).isContentEditable) ||
event.defaultPrevented ||
(isLink && event.which > 1) ||
(isLink && 'which' in event && event.which > 1) ||
(isLink && event.altKey) ||
(isLink && event.ctrlKey) ||
(isLink && event.metaKey) ||
Expand Down

0 comments on commit 61b1cf6

Please sign in to comment.