Prevent scroll when modal is up.

This commit is contained in:
Sage Vaillancourt 2022-10-02 09:57:17 -04:00
parent 577c911f34
commit a23ec07618
2 changed files with 6 additions and 0 deletions

View File

@ -418,3 +418,7 @@ textarea {
.hidden {
display: none;
}
.scroll-lock {
overflow: hidden;
}

View File

@ -9,10 +9,12 @@
<script type="text/javascript">
function closeModal() {
document.getElementById('modal').classList.add('transparent')
document.body.classList.remove('scroll-lock')
}
function showModal(login, text) {
document.getElementById('modal').classList.remove('transparent')
document.getElementById('modal-title').innerText = text
document.body.classList.add('scroll-lock')
const createAccountElements = [
'confirm-password',
'confirm-password-label',