aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-07-19 12:36:07 -0400
committertaehoon <th.dev91@gmail.com>2019-09-20 11:35:47 -0400
commitad504768feacecdbd9f41f4bca470a58fdf0d059 (patch)
tree4cd1b71fe4b2bf17eeea41912b81ed803f8e9c5d
parent8b321f6f1fd8b906cd9e224bbfc2356c8e4e4235 (diff)
lock body scroll
-rw-r--r--src/App.vue1
-rw-r--r--src/components/media_modal/media_modal.vue5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue
index 719e00a4..d7453549 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,6 +4,7 @@
:style="bgAppStyle"
>
<div
+ id="app_bg_wrapper"
class="app-bg-wrapper"
:style="bgStyle"
/>
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index ab5a36a5..06ced5a1 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -1,6 +1,7 @@
<template>
<div
v-if="showing"
+ v-body-scroll-lock="showing"
class="modal-view media-modal-view"
@click.prevent="hide"
>
@@ -43,6 +44,10 @@
.media-modal-view {
z-index: 1001;
+ body:not(.scroll-locked) & {
+ display: none;
+ }
+
&:hover {
.modal-view-button-arrow {
opacity: 0.75;