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(
598
598
if ( typeof numShiftY === 'number' ) {
599
599
// Top
600
600
if ( nextPopupY < visibleRegionArea . top ) {
601
- nextOffsetY -= nextPopupY - visibleRegionArea . top ;
601
+ nextOffsetY -= nextPopupY - visibleRegionArea . top + popupOffsetY ;
602
602
603
603
if ( targetRect . y + targetHeight < visibleRegionArea . top + numShiftY ) {
604
604
nextOffsetY +=
@@ -608,7 +608,7 @@ export default function useAlign(
608
608
609
609
// Bottom
610
610
if ( nextPopupBottom > visibleRegionArea . bottom ) {
611
- nextOffsetY -= nextPopupBottom - visibleRegionArea . bottom ;
611
+ nextOffsetY -= nextPopupBottom - visibleRegionArea . bottom - popupOffsetY ;
612
612
613
613
if ( targetRect . y > visibleRegionArea . bottom - numShiftY ) {
614
614
nextOffsetY += targetRect . y - visibleRegionArea . bottom + numShiftY ;
You can’t perform that action at this time.
0 commit comments