forked from AkkomaGang/akkoma-fe
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) {
|
linkClicked (event) {
|
||||||
let { target } = event
|
let { target } = event
|
||||||
if (target.tagName === 'SPAN') {
|
target = target.tagName === 'A' ? target : target.closest('a')
|
||||||
target = target.parentNode
|
if (target) {
|
||||||
}
|
|
||||||
if (target.tagName === 'A') {
|
|
||||||
if (target.className.match(/mention/)) {
|
if (target.className.match(/mention/)) {
|
||||||
const href = target.href
|
const href = target.href
|
||||||
const attn = this.status.attentions.find(attn => mentionMatchesUrl(attn, href))
|
const attn = this.status.attentions.find(attn => mentionMatchesUrl(attn, href))
|
||||||
|
|
Loading…
Reference in a new issue