Skip to content

Commit b0bd814

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix reflow issue in Chrome another way so it does not break Firefox.
1 parent 1742288 commit b0bd814

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,6 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
11951195
}
11961196
}
11971197
if (this.igxForScrollOrientation === 'vertical') {
1198-
// reset width to force reflow.
1199-
this.scrollComponent.nativeElement.style.width = '';
12001198
this.scrollComponent.nativeElement.style.height = parseInt(this.igxForContainerSize, 10) + 'px';
12011199
this.scrollComponent.size = this._calcHeight();
12021200
if ( this.scrollComponent.size <= parseInt(this.igxForContainerSize, 10)) {

projects/igniteui-angular/src/lib/directives/for-of/virtual.helper.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class VirtualHelperComponent extends VirtualHelperBaseDirective implement
4040
document.body.appendChild(div);
4141
const scrollWidth = div.offsetWidth - div.clientWidth;
4242
document.body.removeChild(div);
43-
return scrollWidth;
43+
return scrollWidth ? scrollWidth + 1 : 0;
4444
}
4545

4646
}

0 commit comments

Comments
 (0)