Merge pull request #276 from Chrissi2812/issue-275

fix #275: link click handler no longer open on selection click
This commit is contained in:
Philipp Kühn
2019-04-30 15:58:10 +02:00
committed by GitHub

View File

@@ -59,7 +59,7 @@ export default class Link extends Mark {
const { schema } = view.state const { schema } = view.state
const attrs = getMarkAttrs(view.state, schema.marks.link) const attrs = getMarkAttrs(view.state, schema.marks.link)
if (attrs.href) { if (attrs.href && event.target instanceof HTMLAnchorElement) {
event.stopPropagation() event.stopPropagation()
window.open(attrs.href) window.open(attrs.href)
} }