Skip to content

Commit 17ed288

Browse files
authored
Merge pull request #7944 from IgniteUI/dmdimitrov/issue7742-master
fix(esf): fixed bottom and right extend in auto position strategy
2 parents af5a276 + 5fefc86 commit 17ed288

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
@@ -119,7 +119,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
119119
*/
120120
private horizontalPush(connectedFit: ConnectedFit): number {
121121
const leftExtend = connectedFit.left;
122-
const rightExtend = connectedFit.right - connectedFit.viewPortRect.right;
122+
const rightExtend = connectedFit.right - connectedFit.viewPortRect.width;
123123
// if leftExtend < 0 overlay goes beyond left end of the screen. We should push it back with exactly
124124
// as much as it is beyond the screen.
125125
// if rightExtend > 0 overlay goes beyond right end of the screen. We should push it back with the
@@ -141,7 +141,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
141141
*/
142142
private verticalPush(connectedFit: ConnectedFit): number {
143143
const topExtend = connectedFit.top;
144-
const bottomExtend = connectedFit.bottom - connectedFit.viewPortRect.bottom;
144+
const bottomExtend = connectedFit.bottom - connectedFit.viewPortRect.height;
145145
if (topExtend < 0) {
146146
return Math.abs(topExtend);
147147
} else if (bottomExtend > 0) {

0 commit comments

Comments
 (0)