Prevent scroll when modal is up.
This commit is contained in:
parent
577c911f34
commit
a23ec07618
|
@ -418,3 +418,7 @@ textarea {
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-lock {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
|
@ -9,10 +9,12 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
document.getElementById('modal').classList.add('transparent')
|
document.getElementById('modal').classList.add('transparent')
|
||||||
|
document.body.classList.remove('scroll-lock')
|
||||||
}
|
}
|
||||||
function showModal(login, text) {
|
function showModal(login, text) {
|
||||||
document.getElementById('modal').classList.remove('transparent')
|
document.getElementById('modal').classList.remove('transparent')
|
||||||
document.getElementById('modal-title').innerText = text
|
document.getElementById('modal-title').innerText = text
|
||||||
|
document.body.classList.add('scroll-lock')
|
||||||
const createAccountElements = [
|
const createAccountElements = [
|
||||||
'confirm-password',
|
'confirm-password',
|
||||||
'confirm-password-label',
|
'confirm-password-label',
|
||||||
|
|
Loading…
Reference in New Issue