Skip to content

Commit

Permalink
#1707 Context toolbar overflow menu not fully displayed when no enoug…
Browse files Browse the repository at this point in the history
…h vertical space (#1708)
  • Loading branch information
tomlyn authored Feb 20, 2024
1 parent ac58a2d commit 2e621f8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export function adjustSubAreaPosition(areaRef, containingDivId, expandDirection,

if (expandDirection === "vertical") {
if (outsideBottom > 0) {
const newTop = actionItemRect.top - thisAreaRect.height;
const topGap = actionItemRect.top - containingDivRect.top;
const newTop = (topGap > thisAreaRect.height)
? actionItemRect.top - thisAreaRect.height
: actionItemRect.bottom - outsideBottom;

areaRef.current.style.top = newTop + "px";
}

Expand Down

0 comments on commit 2e621f8

Please sign in to comment.