fix: 🐛 scroll locking not always working correctly

This commit is contained in:
Sebin Nyshkim 2025-06-27 23:23:16 +02:00
parent 9552e4713f
commit 3e7d50dc1b
2 changed files with 1 additions and 3 deletions

View file

@ -16,7 +16,7 @@
min-height: 100dvh; min-height: 100dvh;
} }
body.scroll-lock { body[inert] {
overflow: hidden; overflow: hidden;
} }

View file

@ -5,12 +5,10 @@
const open = () => { const open = () => {
dialog.showModal(); dialog.showModal();
document.body.classList.toggle('scroll-lock');
document.body.inert = true; document.body.inert = true;
}; };
const close = (result) => { const close = (result) => {
document.body.classList.toggle('scroll-lock');
document.body.inert = false; document.body.inert = false;
storeProxy.setItem('isHorny', result); storeProxy.setItem('isHorny', result);
if (result && storeProxy.getItem('isInHornyJail') !== 'true') { if (result && storeProxy.getItem('isInHornyJail') !== 'true') {