mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
fix(web): ensure relative modal respects scrollY
This commit is contained in:
parent
15ae3bee55
commit
b422a83b57
@ -59,7 +59,7 @@ export default function RelativeModal({ className, role = 'dialog', children, on
|
|||||||
if (top + menuHeight > windowHeight - WINDOW_PADDING) {
|
if (top + menuHeight > windowHeight - WINDOW_PADDING) {
|
||||||
top = y - menuHeight;
|
top = y - menuHeight;
|
||||||
}
|
}
|
||||||
setPosition({ left, top, width });
|
setPosition({ left, top: top + window.scrollY, width });
|
||||||
const focusable = ref.current.querySelector('[tabindex]');
|
const focusable = ref.current.querySelector('[tabindex]');
|
||||||
focusable && console.log('focusing');
|
focusable && console.log('focusing');
|
||||||
focusable && focusable.focus();
|
focusable && focusable.focus();
|
||||||
|
Loading…
Reference in New Issue
Block a user