chore: rename html element for context

This commit is contained in:
Christian Andolf
2025-04-02 13:53:20 +02:00
parent d4f5aea31c
commit 7b66533dba

View File

@@ -34,14 +34,14 @@ export default function GuestsRoomsPickerForm() {
//isOpen is the 'old state', so isOpen === true means "The modal is open and WILL be closed". //isOpen is the 'old state', so isOpen === true means "The modal is open and WILL be closed".
async function setOverflowClip(isOpen: boolean) { async function setOverflowClip(isOpen: boolean) {
const htmlElement = document.body const bodyElement = document.body
if (htmlElement) { if (bodyElement) {
if (isOpen) { if (isOpen) {
htmlElement.style.overflow = "visible" bodyElement.style.overflow = "visible"
} else { } else {
// !important needed to override 'overflow: hidden' set by react-aria. // !important needed to override 'overflow: hidden' set by react-aria.
// 'overflow: hidden' does not work in combination with other sticky positioned elements, which clip does. // 'overflow: hidden' does not work in combination with other sticky positioned elements, which clip does.
htmlElement.style.overflow = "clip !important" bodyElement.style.overflow = "clip !important"
} }
} }
if (!isOpen) { if (!isOpen) {