Skip to content

Commit

Permalink
Merge pull request #276 from Chrissi2812/issue-275
Browse files Browse the repository at this point in the history
fix #275: link click handler no longer open on selection click
  • Loading branch information
philippkuehn authored Apr 30, 2019
2 parents 8842ec4 + 44dc533 commit d1a1dec
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 d1a1dec

Please sign in to comment.