diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/media_modal/media_modal.js | 2 | ||||
| -rw-r--r-- | src/components/status_content/status_content.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index abb18c7d..24764e80 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -84,10 +84,12 @@ const MediaModal = { } }, mounted () { + window.addEventListener('popstate', this.hide) document.addEventListener('keyup', this.handleKeyupEvent) document.addEventListener('keydown', this.handleKeydownEvent) }, destroyed () { + window.removeEventListener('popstate', this.hide) document.removeEventListener('keyup', this.handleKeyupEvent) document.removeEventListener('keydown', this.handleKeydownEvent) } diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index ccc01b6f..c0a71e8f 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -176,8 +176,8 @@ const StatusContent = { } } if (target.rel.match(/(?:^|\s)tag(?:$|\s)/) || target.className.match(/hashtag/)) { - // Extract tag name from link url - const tag = extractTagFromUrl(target.href) + // Extract tag name from dataset or link url + const tag = target.dataset.tag || extractTagFromUrl(target.href) if (tag) { const link = this.generateTagLink(tag) this.$router.push(link) |
