diff options
| author | taehoon <th.dev91@gmail.com> | 2019-07-23 15:43:03 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-07-23 15:43:03 -0400 |
| commit | 09efcb48a4c1e22c0cef467adc9cfcefe2818c0d (patch) | |
| tree | e2ac332d82905bde39140dabd91e7c866bea855a /src/components/status/status.js | |
| parent | e448950023936b5b3e43b025c3fddce12534c71c (diff) | |
try to use the closest a tag as target
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 6 |
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)) |
