File tree 2 files changed +6
-0
lines changed 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2952,6 +2952,9 @@ describe('CdkDrag', () => {
2952
2952
expect ( placeholder . textContent ! . trim ( ) )
2953
2953
. withContext ( 'Expected placeholder content to match element' )
2954
2954
. toContain ( 'One' ) ;
2955
+ expect ( placeholder . style . pointerEvents )
2956
+ . withContext ( 'Expected pointer events to be disabled on placeholder' )
2957
+ . toBe ( 'none' ) ;
2955
2958
2956
2959
dispatchMouseEvent ( document , 'mouseup' ) ;
2957
2960
fixture . detectChanges ( ) ;
Original file line number Diff line number Diff line change @@ -1159,6 +1159,9 @@ export class DragRef<T = any> {
1159
1159
placeholder = deepCloneNode ( this . _rootElement ) ;
1160
1160
}
1161
1161
1162
+ // Stop pointer events on the preview so the user can't
1163
+ // interact with it while the preview is animating.
1164
+ placeholder . style . pointerEvents = 'none' ;
1162
1165
placeholder . classList . add ( 'cdk-drag-placeholder' ) ;
1163
1166
return placeholder ;
1164
1167
}
You can’t perform that action at this time.
0 commit comments