forked from rDrama/rDrama
better solution to the modal scrollbar question
parent
ff8e937112
commit
28117b5159
|
@ -1804,13 +1804,6 @@ button.close {
|
||||||
.toast-body {
|
.toast-body {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
}
|
}
|
||||||
.modal-open {
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
.modal-open .modal {
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -1819,7 +1812,8 @@ button.close {
|
||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
padding-right: 0 !important; /* fix Safari zoom issue */
|
padding-right: 0 !important; /* fix Safari zoom issue */
|
||||||
}
|
}
|
||||||
|
@ -7681,12 +7675,6 @@ ul {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.modal-open {
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
.modal-open nav {
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if (location.hash.startsWith("#m-")) {
|
||||||
|
history.replaceState({}, '', location.href.split('#')[0])
|
||||||
|
}
|
||||||
|
|
||||||
const SITE_FULL_IMAGES = document.getElementById('SITE_FULL_IMAGES').value
|
const SITE_FULL_IMAGES = document.getElementById('SITE_FULL_IMAGES').value
|
||||||
|
|
||||||
function getMessageFromJsonData(success, json) {
|
function getMessageFromJsonData(success, json) {
|
||||||
|
@ -694,14 +698,18 @@ function enablePushNotifications() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const body = document.getElementsByTagName('body')[0]
|
addEventListener('wheel', function (e) {
|
||||||
addEventListener('hashchange', () => {
|
if (location.hash.startsWith("#m-")) {
|
||||||
if (location.hash.startsWith("#m-"))
|
e.preventDefault();
|
||||||
body.classList.add('modal-open')
|
e.stopPropagation();
|
||||||
else
|
return false;
|
||||||
body.classList.remove('modal-open')
|
}
|
||||||
})
|
}, {passive: false});
|
||||||
|
|
||||||
if (location.hash.startsWith("#m-")) {
|
addEventListener('touchmove', function (e) {
|
||||||
history.replaceState({}, '', location.href.split('#')[0])
|
if (location.hash.startsWith("#m-")) {
|
||||||
}
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, {passive: false});
|
||||||
|
|
Loading…
Reference in New Issue