I'm working with Angular 7, and I have a directive that listens to the scrolling of an element. The problem is, that I want the directive to respond only to manual scrolls, and ignore programmatic scrolls done with element.scrollTop = x.
The directive contains a scroll listener, like so:
@HostListener('scroll', ['$event'])
onScroll($event) {
}
In one of the places in my code I set a programmatic scrollTop as described above, and an event was caught by the listener. I tried to find a property on $event that would indicate whether the event was manual or not, but couldn't find one. Did I miss it? Or perhaps that I can somehow trigger a custom event in vanilla javascript that would contain such indication (I know that in jQuery you can do that, but I'm not using jQuery here...). Thanks.
scrollTopproperty