title: rxjs pairwise is emitting duplicate values
body: <p>I'm trying to create two scroll event observable for both scroll direction vertical and horizontal.</p>
  
  <p>I tried using <code>pairwise()</code> and <code>bufferCount(2,1)</code> operators to filter vertical scroll event from the horizontal one, but the problem is with getting duplicate values for <code>prev.scrollTop</code> and <code>curr.scrollTop</code></p>
  
  <pre class="lang-js prettyprint-override"><code>import { Component, ViewChild, AfterViewInit, ElementRef } from '@angular/core';
  import { fromEvent } from 'rxjs';
  import { pairwise, tap, filter } from 'rxjs/operators';
  
  @Component({
    selector: 'my-app',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent implements AfterViewInit {
  
    @ViewChild('scrollable', {static: false}) scrollable: ElementRef;
  
  
    ngAfterViewInit() {
  
      fromEvent(this.scrollable.nativeElement, 'scroll').pipe(
        pairwise(),
        tap(([prev, curr]) =&gt; console.log(prev.target.scrollTop, curr.target.scrollTop)),
        filter(([prev, curr]) =&gt; prev.target.scrollTop !== curr.target.scrollTop),
        tap((e) =&gt; console.log(e)) // &lt;=    Never reached
      ).subscribe();
  
    }
  
  }
  
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><a href="https://stackblitz.com/edit/angular-5zqlsj" rel="nofollow noreferrer">stackblitz reproduction</a></p>