diff --git a/packages/core/src/shouldIntercept.ts b/packages/core/src/shouldIntercept.ts index c46b9b5c2..6d5bf9f67 100644 --- a/packages/core/src/shouldIntercept.ts +++ b/packages/core/src/shouldIntercept.ts @@ -1,9 +1,9 @@ -export default function shouldIntercept(event: MouseEvent | KeyboardEvent): boolean { +export default function shouldIntercept(event: MouseEvent | KeyboardEvent | import('react').MouseEvent): 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) ||