Skip to content

Commit 7e37240

Browse files
committed
fix(grid): reset scrollAmount value #6369
1 parent 9b33cf1 commit 7e37240

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

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

0 commit comments

Comments
 (0)