Skip to content

Commit

Permalink
Merge pull request #157 from jikoczl/fix-contextmenu-overflow
Browse files Browse the repository at this point in the history
fix: context menu over flow
  • Loading branch information
Qaplagzy authored Dec 30, 2022
2 parents 513df75 + 7c6e386 commit 8f5ff99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/ContextMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ const ContextMenu: React.FC = () => {
const rect = containerRef.current.getBoundingClientRect();
const menuW = rect.width;
const menuH = rect.height;
let top = contextMenu.pageY;
let left = contextMenu.pageX;
let top = contextMenu.y;
let left = contextMenu.x;

let hasOverflow = false;
if (left + menuW > winW) {
Expand Down

0 comments on commit 8f5ff99

Please sign in to comment.