diff --git a/projects/cdk/observables/pressed-observable.ts b/projects/cdk/observables/pressed-observable.ts index 24b7beac939a..259b326365a3 100644 --- a/projects/cdk/observables/pressed-observable.ts +++ b/projects/cdk/observables/pressed-observable.ts @@ -1,5 +1,5 @@ import {Observable} from 'rxjs'; -import {mapTo, startWith, switchMapTo, take} from 'rxjs/operators'; +import {filter, mapTo, startWith, switchMapTo, take} from 'rxjs/operators'; import {mouseDragFinishFrom} from './mouse-drag-finish-from'; import {typedFromEvent} from './typed-from-event'; @@ -11,6 +11,7 @@ export function pressedObservable(element: Element): Observable { } return typedFromEvent(element, 'mousedown').pipe( + filter(({isTrusted}) => isTrusted), switchMapTo( mouseDragFinishFrom(ownerDocument).pipe( mapTo(false),