浏览代码

fix: Context menu positioning when component has offsets (#5520)

Update Popover.tsx
zsviczian 2 年之前
父节点
当前提交
aca284057d
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      src/components/Popover.tsx

+ 0 - 1
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) {