fix #275: link click handler no longer open on selection click

This commit is contained in:
Chrissi2812
2019-04-29 15:24:03 +02:00
parent cf7ff907a1
commit 44dc5337dc

View File

@@ -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)
}