Skip to content

Commit

Permalink
Don't scroll background when modal is open
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Feb 22, 2024
1 parent d30221f commit 062cb3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,12 @@ document.addEventListener('DOMContentLoaded', () => {
// Functions to open and close a modal
function openModal($el) {
$el.classList.add('is-active');
document.querySelector('html').classList.add('is-clipped');
}

function closeModal($el) {
$el.classList.remove('is-active');
document.querySelector('html').classList.remove('is-clipped');
}

function closeAllModals() {
Expand Down

0 comments on commit 062cb3a

Please sign in to comment.