aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-07-23 15:43:03 -0400
committertaehoon <th.dev91@gmail.com>2019-07-23 15:43:03 -0400
commit09efcb48a4c1e22c0cef467adc9cfcefe2818c0d (patch)
treee2ac332d82905bde39140dabd91e7c866bea855a
parente448950023936b5b3e43b025c3fddce12534c71c (diff)
try to use the closest a tag as target
-rw-r--r--src/components/status/status.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index faefb80e..f87a2413 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -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))