Skip to content

Commit

Permalink
fix #275: link click handler no longer open on selection click
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrissi2812 committed Apr 29, 2019
1 parent cf7ff90 commit 44dc533
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/tiptap-extensions/src/marks/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class Link extends Mark {
const { schema } = view.state
const attrs = getMarkAttrs(view.state, schema.marks.link)

if (attrs.href) {
if (attrs.href && event.target instanceof HTMLAnchorElement) {
event.stopPropagation()
window.open(attrs.href)
}
Expand Down

0 comments on commit 44dc533

Please sign in to comment.