diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2021-08-02 19:34:18 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-03-13 12:00:44 -0400 |
| commit | 3502d374e3d8546699f644fad2a5e98598d7df3a (patch) | |
| tree | 6ce1c2468ee03025c3b3f18bb2e592a1c463dfcc | |
| parent | 0190a360709cde899387b311dcf4bbaf508b00ba (diff) | |
Prevent the click event from firing on content below modal
| -rw-r--r-- | src/components/media_modal/media_modal.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index 2f00f5f9..f4c99f6a 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -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) { |
