99import { EmbeddedViewRef , ElementRef , NgZone , ViewContainerRef , TemplateRef } from '@angular/core' ;
1010import { ViewportRuler } from '@angular/cdk/scrolling' ;
1111import { Direction } from '@angular/cdk/bidi' ;
12- import { normalizePassiveListenerOptions , _getShadowRoot } from '@angular/cdk/platform' ;
12+ import {
13+ normalizePassiveListenerOptions ,
14+ _getEventTarget ,
15+ _getShadowRoot ,
16+ } from '@angular/cdk/platform' ;
1317import { coerceBooleanProperty , coerceElement } from '@angular/cdk/coercion' ;
1418import { Subscription , Subject , Observable } from 'rxjs' ;
1519import { DropListRefInternal as DropListRef } from './drop-list-ref' ;
@@ -22,7 +26,7 @@ import {
2226} from './drag-styling' ;
2327import { getTransformTransitionDurationInMs } from './transition-duration' ;
2428import { getMutableClientRect , adjustClientRect } from './client-rect' ;
25- import { getEventTarget , ParentPositionTracker } from './parent-position-tracker' ;
29+ import { ParentPositionTracker } from './parent-position-tracker' ;
2630import { deepCloneNode } from './clone-node' ;
2731
2832/** Object that can be used to configure the behavior of DragRef. */
@@ -629,7 +633,7 @@ export class DragRef<T = any> {
629633 // Delegate the event based on whether it started from a handle or the element itself.
630634 if ( this . _handles . length ) {
631635 const targetHandle = this . _handles . find ( handle => {
632- const target = getEventTarget ( event ) ;
636+ const target = _getEventTarget ( event ) ;
633637 return ! ! target && ( target === handle || handle . contains ( target as HTMLElement ) ) ;
634638 } ) ;
635639
@@ -857,7 +861,7 @@ export class DragRef<T = any> {
857861 const isTouchSequence = isTouchEvent ( event ) ;
858862 const isAuxiliaryMouseButton = ! isTouchSequence && ( event as MouseEvent ) . button !== 0 ;
859863 const rootElement = this . _rootElement ;
860- const target = getEventTarget ( event ) ;
864+ const target = _getEventTarget ( event ) ;
861865 const isSyntheticEvent = ! isTouchSequence && this . _lastTouchEventTime &&
862866 this . _lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date . now ( ) ;
863867
@@ -1091,7 +1095,7 @@ export class DragRef<T = any> {
10911095 return this . _ngZone . runOutsideAngular ( ( ) => {
10921096 return new Promise ( resolve => {
10931097 const handler = ( ( event : TransitionEvent ) => {
1094- if ( ! event || ( getEventTarget ( event ) === this . _preview &&
1098+ if ( ! event || ( _getEventTarget ( event ) === this . _preview &&
10951099 event . propertyName === 'transform' ) ) {
10961100 this . _preview . removeEventListener ( 'transitionend' , handler ) ;
10971101 resolve ( ) ;
@@ -1387,7 +1391,7 @@ export class DragRef<T = any> {
13871391 const scrollDifference = this . _parentPositions . handleScroll ( event ) ;
13881392
13891393 if ( scrollDifference ) {
1390- const target = getEventTarget ( event ) ;
1394+ const target = _getEventTarget < HTMLElement | Document > ( event ) ! ;
13911395
13921396 // ClientRect dimensions are based on the scroll position of the page and its parent node so
13931397 // we have to update the cached boundary ClientRect if the user has scrolled. Check for
0 commit comments