1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

fix anchor target

This commit is contained in:
Rokt33r
2016-01-25 10:28:46 +09:00
parent ce74e69480
commit 0fe83a0583

View File

@@ -49,12 +49,12 @@ const sanitizeOpts = {
}
function handleAnchorClick (e) {
if (e.target.attributes.href && e.target.attributes.href.nodeValue.match(/#.+/)) {
if (this.attributes.href && this.attributes.href.nodeValue.match(/^#.+/)) {
return
}
e.preventDefault()
e.stopPropagation()
let href = e.target.href
let href = this.href
if (href && href.match(/^http:\/\/|https:\/\/|mailto:\/\//)) {
shell.openExternal(href)
}