try to use the closest a tag as target
This commit is contained in:
parent
e448950023
commit
09efcb48a4
1 changed files with 2 additions and 4 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue