Skip to content

Commit 78254c8

Browse files
committed
fix(grid): reset scrollAmount value #6369
1 parent 4264b57 commit 78254c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,6 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
329329
this.scrollComponent.nativeElement.scrollLeft = val;
330330
} else if (this.scrollComponent) {
331331
this.scrollComponent.nativeElement.scrollTop = val;
332-
// Need to set value for scrollAmount here, because
333-
// Firefox does not fire the scrollComponent scroll event handler
334-
this.scrollComponent.scrollAmount = val;
335332
}
336333
}
337334

@@ -1180,6 +1177,9 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
11801177
this.scrollComponent.size = this._calcHeight();
11811178
if ( this.scrollComponent.size <= parseInt(this.igxForContainerSize, 10)) {
11821179
this.scrollPosition = 0;
1180+
// Need to reset the scrollAmount value here, because
1181+
// Firefox will not fire the scrollComponent scroll event handler
1182+
this.scrollComponent.scrollAmount = 0;
11831183
}
11841184
}
11851185
if (scrollable !== this.isScrollable()) {

0 commit comments

Comments
 (0)