Skip to content

Commit d6a78ed

Browse files
authored
Merge pull request #2433 from IgniteUI/SKrastev/fix-1639-master
Fix scrolling using touch on Edge and IE scrolls the page but not the content.
2 parents 8492b11 + 91d6396 commit d6a78ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
231231

232232
const dcFactory: ComponentFactory<DisplayContainerComponent> = this.resolver.resolveComponentFactory(DisplayContainerComponent);
233233
this.dc = this._viewContainer.createComponent(dcFactory, 0);
234+
235+
if (typeof MSGesture === 'function') {
236+
// On Edge and IE when scrolling on touch the page scroll instead of the grid.
237+
this.dc.instance._viewContainer.element.nativeElement.style.touchAction = 'none';
238+
}
234239
if (this.igxForOf && this.igxForOf.length) {
235240
this.dc.instance.notVirtual = !(this.igxForContainerSize && this.state.chunkSize < this.igxForOf.length);
236241
if (this.igxForScrollOrientation === 'horizontal') {

0 commit comments

Comments
 (0)