chore: rename html element for context
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user