Merge pull request #276 from Chrissi2812/issue-275
fix #275: link click handler no longer open on selection click
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user