mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
reposition the modal when close to bottom (#5507)
This commit is contained in:
parent
1715e2e09d
commit
c9cd810c9f
@ -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