Consider y coord when determining bottom collision (#62403)

pull/62504/head
Kristina 3 years ago committed by GitHub
parent 7a465f42a6
commit b6f477ae03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-ui/src/components/ContextMenu/ContextMenu.tsx

@ -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({

Loading…
Cancel
Save