set top postion to widow_padding

This commit is contained in:
Bernt Christian Egeland 2021-07-05 21:06:17 +02:00
parent 6e6ee93282
commit 9f45da6cfb

View File

@ -79,7 +79,7 @@ export default function RelativeModal({
}
// too close to bottom
if (top + menuHeight > windowHeight - WINDOW_PADDING + window.scrollY) {
newTop = relativeToY - menuHeight;
newTop = WINDOW_PADDING;
}
if (top <= WINDOW_PADDING + window.scrollY) {