Prevent the click event from firing on content below modal

This commit is contained in:
Tusooa Zhu 2021-08-02 19:34:18 -04:00
parent 0190a36070
commit 3502d374e3
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224

View file

@ -70,7 +70,12 @@ const MediaModal = {
return fileTypeService.fileType(media.mimetype)
},
hide () {
this.$store.dispatch('closeMediaViewer')
// HACK: Closing immediately via a touch will cause the click
// to be processed on the content below the overlay
const transitionTime = 100 // ms
setTimeout(() => {
this.$store.dispatch('closeMediaViewer')
}, transitionTime)
},
goPrev () {
if (this.canNavigate) {