Skip to content
Snippets Groups Projects
Commit a6f73d7d authored by HJ's avatar HJ :fire:
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment