mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
reposition the modal when close to bottom
This commit is contained in:
parent
1715e2e09d
commit
776e73c9ea
@ -80,7 +80,9 @@ export default function RelativeModal({
|
||||
|
||||
// too close to bottom
|
||||
if (top + menuHeight > windowHeight - WINDOW_PADDING + window.scrollY) {
|
||||
newTop = WINDOW_PADDING;
|
||||
// If the pop-up modal would extend beyond the bottom of the visible window,
|
||||
// reposition the modal to appear above the clicked icon instead
|
||||
newTop = top - menuHeight;
|
||||
}
|
||||
|
||||
if (top <= WINDOW_PADDING + window.scrollY) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user