try to use the closest a tag as target

This commit is contained in:
taehoon 2019-07-23 15:43:03 -04:00
parent e448950023
commit 09efcb48a4

View File

@ -323,10 +323,8 @@ const Status = {
},
linkClicked (event) {
let { target } = event
if (target.tagName === 'SPAN') {
target = target.parentNode
}
if (target.tagName === 'A') {
target = target.tagName === 'A' ? target : target.closest('a')
if (target) {
if (target.className.match(/mention/)) {
const href = target.href
const attn = this.status.attentions.find(attn => mentionMatchesUrl(attn, href))