diff --git a/apps/scandic-web/components/GuestsRoomsPicker/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/index.tsx index d68d3ee62..f37e26db7 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/index.tsx @@ -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". async function setOverflowClip(isOpen: boolean) { - const htmlElement = document.body - if (htmlElement) { + const bodyElement = document.body + if (bodyElement) { if (isOpen) { - htmlElement.style.overflow = "visible" + bodyElement.style.overflow = "visible" } else { // !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. - htmlElement.style.overflow = "clip !important" + bodyElement.style.overflow = "clip !important" } } if (!isOpen) {