diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index e8f00b5902..17d835dd0d 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -539,11 +539,9 @@ function parentMouseMove(ev: MouseEvent) { let childSideBottomY = childBounding.bottom - rootBounding.top; const childSideHeight = childSideBottomY - childSideTopY; - if (childSideHeight < CHILD_SIDE_MIN_HEIGHT) { - const expandY = (CHILD_SIDE_MIN_HEIGHT - childSideHeight) / 2; - childSideTopY -= expandY; - childSideBottomY += expandY; - } + const expandY = Math.max(0, (CHILD_SIDE_MIN_HEIGHT - childSideHeight)) / 2; + childSideTopY -= expandY; + childSideBottomY += expandY; childSideTopY -= childSideYPadding; childSideBottomY += childSideYPadding;