fix: reduce unnecessary notice modal scrolling

This commit is contained in:
SethBurkart123
2026-03-18 10:44:56 +11:00
parent 6291b7d0a7
commit 27aa28740e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -3726,7 +3726,7 @@ div.day-empty {
background: var(--background-primary);
border-radius: 16px;
max-width: 600px;
max-height: 80vh;
max-height: 90vh;
width: 100%;
overflow: hidden;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
@@ -3792,7 +3792,7 @@ div.day-empty {
margin: 0 !important;
flex: 1;
display: block;
min-width: 600px;
min-width: 0;
width: 100%;
}
+2 -2
View File
@@ -468,7 +468,7 @@ function openNoticeModal(
document.body.removeChild(tempMeasureDiv);
let targetHeight = Math.round(
Math.min(Math.max(measuredHeight, 200), viewportHeight * 0.85),
Math.min(Math.max(measuredHeight + 32, 200), viewportHeight * 0.9),
);
let targetLeft = Math.round((viewportWidth - targetWidth) / 2);
let targetTop = Math.round((viewportHeight - targetHeight) / 2) + scrollY;
@@ -580,7 +580,7 @@ function openNoticeModal(
);
const currentHeight = unifiedContent.getBoundingClientRect().height;
const newTargetHeight = Math.round(
Math.min(Math.max(currentHeight, 200), newViewportHeight * 0.85),
Math.min(Math.max(currentHeight + 32, 200), newViewportHeight * 0.9),
);
const newTargetLeft = Math.round((newViewportWidth - newTargetWidth) / 2);
const newTargetTop =