Skip to content

Commit 88d0838

Browse files
committed
fix(overlay): fix and auto strategy, #6474
1 parent 2c3371f commit 88d0838

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/igniteui-angular/src/lib/services/overlay/position/auto-position-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
5050
const leftBorder = this.calculateLeft(
5151
connectedFit.targetRect, connectedFit.contentElementRect, flippedStartPoint, flippedDirection);
5252
const rightBorder = leftBorder + connectedFit.contentElementRect.width;
53-
return connectedFit.viewPortRect.left < leftBorder && rightBorder < connectedFit.viewPortRect.right;
53+
return 0 < leftBorder && rightBorder < connectedFit.viewPortRect.width;
5454
}
5555

5656
/**
@@ -65,7 +65,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
6565
const topBorder = this.calculateTop(
6666
connectedFit.targetRect, connectedFit.contentElementRect, flippedStartPoint, flippedDirection);
6767
const bottomBorder = topBorder + connectedFit.contentElementRect.height;
68-
return connectedFit.viewPortRect.top < topBorder && bottomBorder < connectedFit.viewPortRect.bottom;
68+
return 0 < topBorder && bottomBorder < connectedFit.viewPortRect.height;
6969
}
7070

7171
/**

0 commit comments

Comments
 (0)