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