Skip to content

Commit

Permalink
tmp: don't run onClick callback when link is clicked
Browse files Browse the repository at this point in the history
This is temporary to test the new link bubble feature. A proper
refactoring of the link handling callback functions will follow later.
  • Loading branch information
mejo- committed Dec 23, 2023
1 parent c15fb5e commit 251a713
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const clickHandler = ({ editor, type, onClick }) => {
// We use custom onClick handler only for left clicks
if (event.button === 0 && !event.ctrlKey) {
event.stopPropagation()
return
return onClick?.(event, link.attrs)

Check failure on line 24 in src/plugins/link.js

View workflow job for this annotation

GitHub Actions / eslint

Unreachable code
}
},
Expand Down

0 comments on commit 251a713

Please sign in to comment.