Skip to content

Commit 2bdd150

Browse files
committed
fix(select): Scroll to item -smaller screens #5911
1 parent 98ad159 commit 2bdd150

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: projects/igniteui-angular/src/lib/select/select-positioning-strategy.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ export class SelectPositioningStrategy extends BaseFitPositionStrategy implement
7373
}
7474

7575
public itemIsInvisible(selectFit: SelectFit) {
76-
return selectFit.itemElement.getBoundingClientRect().top >= selectFit.dropDownList.getBoundingClientRect().bottom ||
77-
selectFit.itemElement.getBoundingClientRect().bottom <= selectFit.dropDownList.getBoundingClientRect().top;
76+
return Math.round(selectFit.itemElement.getBoundingClientRect().top * 100) / 100 >=
77+
Math.round(selectFit.dropDownList.getBoundingClientRect().bottom * 100) / 100 ||
78+
Math.round(selectFit.itemElement.getBoundingClientRect().bottom * 100) / 100 <=
79+
Math.round(selectFit.dropDownList.getBoundingClientRect().top * 100) / 100 ;
7880
}
7981

8082
private manageScrollToItem(selectFit: SelectFit) {

0 commit comments

Comments
 (0)