[v9.4.x] Consider y coord when determining bottom collision (#62506)
Consider y coord when determining bottom collision (#62403)
(cherry picked from commit b6f477ae03)
Co-authored-by: Kristina <kristina.durivage@grafana.com>
This commit is contained in:
co-authored by
Kristina
parent
34524d6dfa
commit
48bd8ebe92
@@ -33,7 +33,7 @@ export const ContextMenu: React.FC<ContextMenuProps> = React.memo(
|
||||
const OFFSET = 5;
|
||||
const collisions = {
|
||||
right: window.innerWidth < x + rect.width,
|
||||
bottom: window.innerHeight < rect.bottom + rect.height + OFFSET,
|
||||
bottom: window.innerHeight < y + rect.height + OFFSET,
|
||||
};
|
||||
|
||||
setPositionStyles({
|
||||
|
||||
Reference in New Issue
Block a user