Commit a6f73d7d authored by HJ's avatar HJ 🐼

Merge branch '788-hide-media-viewer-on-navigation' into 'develop'

MediaModal: Close on browser navigation events.

Closes #788

See merge request pleroma/pleroma-fe!1129
parents 7f755878 cb99dc2b
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment