aboutsummaryrefslogtreecommitdiff
path: root/src/components/media_modal/media_modal.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-06-18 16:47:37 +0300
committerShpuld Shpuldson <shp@cock.li>2020-06-18 16:47:37 +0300
commit8a9654b511268338d46f351da43a6bd85fbcb972 (patch)
tree66d477ba0dc307e1074b5025933918da5ef31478 /src/components/media_modal/media_modal.js
parent6d2befa452d6b42e47968f382a7ff62d4eb0d9b9 (diff)
parentebf4321e645a34a40c00b0884546e9da86361952 (diff)
Merge branch 'develop' into features/favicons
Diffstat (limited to 'src/components/media_modal/media_modal.js')
-rw-r--r--src/components/media_modal/media_modal.js2
1 files changed, 2 insertions, 0 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)
}