From 48bd8ebe927a13bf327ef468771d53d2db70f12b Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 30 Jan 2023 17:01:53 +0000 Subject: [PATCH] [v9.4.x] Consider y coord when determining bottom collision (#62506) Consider y coord when determining bottom collision (#62403) (cherry picked from commit b6f477ae03b90c788df96aeaea11c678a5a099ce) Co-authored-by: Kristina --- packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx b/packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx index bde5b951c51..04bf348225e 100644 --- a/packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx +++ b/packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx @@ -33,7 +33,7 @@ export const ContextMenu: React.FC = 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({