File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ export default function useAlign(
598598 if ( typeof numShiftY === 'number' ) {
599599 // Top
600600 if ( nextPopupY < visibleRegionArea . top ) {
601- nextOffsetY -= nextPopupY - visibleRegionArea . top ;
601+ nextOffsetY -= nextPopupY - visibleRegionArea . top + popupOffsetY ;
602602
603603 if ( targetRect . y + targetHeight < visibleRegionArea . top + numShiftY ) {
604604 nextOffsetY +=
@@ -608,7 +608,7 @@ export default function useAlign(
608608
609609 // Bottom
610610 if ( nextPopupBottom > visibleRegionArea . bottom ) {
611- nextOffsetY -= nextPopupBottom - visibleRegionArea . bottom ;
611+ nextOffsetY -= nextPopupBottom - visibleRegionArea . bottom - popupOffsetY ;
612612
613613 if ( targetRect . y > visibleRegionArea . bottom - numShiftY ) {
614614 nextOffsetY += targetRect . y - visibleRegionArea . bottom + numShiftY ;
You can’t perform that action at this time.
0 commit comments