title: Element contains not working (Angular 2+, RxJS)
body: <p>Here is my code. <a href="https://stackblitz.com/edit/angular-tq2vaa" rel="noreferrer">https://stackblitz.com/edit/angular-tq2vaa</a></p>
  
  <pre><code>constructor(private host: ElementRef) {
  }
  
  get element() {
      return this.host.nativeElement;
  }
  
  private editModeHandler() {
       const clickOutside$ = fromEvent(document, 'click').pipe(
          filter(({ target }) =&gt; {
          console.log('parent', this.element, 'child', target)
  
            const ans = this.element.contains(target) === false
            console.log(ans)
            return  ans
          }),
          take(1)
       )
  }
  </code></pre>
  
  <p>This is what it prints in the console. As you can see, app-editable-component contains h3 which is the target but why ans is true???</p>
  
  <p><a href="https://i.stack.imgur.com/mlwHv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mlwHv.png" alt="cont"></a></p>