From aca284057da6d7bce2a2f28dad5089d5c8bbd3b8 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Tue, 2 Aug 2022 08:08:55 +0200 Subject: [PATCH] fix: Context menu positioning when component has offsets (#5520) Update Popover.tsx --- src/components/Popover.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Popover.tsx b/src/components/Popover.tsx index 630fee1c..9a046599 100644 --- a/src/components/Popover.tsx +++ b/src/components/Popover.tsx @@ -69,7 +69,6 @@ export const Popover = ({ if (fitInViewport && popoverRef.current) { const element = popoverRef.current; const { x, y, width, height } = element.getBoundingClientRect(); - const { innerWidth: viewportWidth, innerHeight: viewportHeight } = window; //Position correctly when clicked on rightmost part or the bottom part of viewport if (x + width - offsetLeft > viewportWidth) {