aboutsummaryrefslogtreecommitdiff
path: root/src/components/media_modal/media_modal.js
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-06-18 08:47:50 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-06-18 08:47:50 +0300
commit08444c390348076231f15bd84b613cf39380bb72 (patch)
tree4e00c479c37a052e51c8d081a76b0d03b3986127 /src/components/media_modal/media_modal.js
parente3d0b2f137ccb355c16788e9b890df609cee1698 (diff)
parent57626c125d0477716a638854c4243ee0fde96923 (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
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)
}