Skip to content

Commit

Permalink
check if event target is a child of anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
aldinezi committed Sep 7, 2023
1 parent 812d278 commit aca58b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-link/src/helpers/clickHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {

const eventTarget = event.target as HTMLElement

if (eventTarget.nodeName !== 'A') {
if (eventTarget.nodeName !== 'A' && !eventTarget.closest('a')) {
return false
}

Expand Down

0 comments on commit aca58b8

Please sign in to comment.