IE11 + [infiniteScrollContainer]
ERROR: Uncaught (in promise): TypeError: Invalid event target at ScrollRegister.prototype.attachEvent
In function ScrollRegister.prototype.attachEvent
The problem comes using a class selector and IE11
[infiniteScrollContainer]="'.myClass'"
I have retrieved the dom element using ViewChild and passed it as an object and it worked
TS:
@ViewChild('scrollZone') el:any;
myDomElement = this.el._element.nativeElement;
HTML:
[infiniteScrollContainer]="myDomElement"
I had a similar issue which was related to the window.hasOwnProperty('document') check in resolveContainerElement method which was always "false" for me in IE11.
Because of that the (string) selector itself was used as element when trying to attach the event - which obviously is not possible. Maybe this is the same here?
I exchanged
const hasWindow = window && window.hasOwnProperty('document');
with
const hasWindow = window && window.document && window.document.documentElement;
and it works fine for me now. (IE11, FF latest, Chrome latest, Edge)
This code from @mrucelum is what is working in IE11. #203 doesn't seem to handle the scrolling correctly.
just published 0.7.2 - please confirm
fixed.
Most helpful comment
The problem comes using a class selector and IE11
[infiniteScrollContainer]="'.myClass'"
I have retrieved the dom element using ViewChild and passed it as an object and it worked
TS:
@ViewChild('scrollZone') el:any;
myDomElement = this.el._element.nativeElement;
HTML:
[infiniteScrollContainer]="myDomElement"