It's been a while, but I finally cracked the code and found a solution to the problem!
Start by incorporating this global CSS snippet:
body.inheritCursors * {
cursor: inherit !important;
}
For your cdkDrag element, include cdkDragStarted and link it to a function in your .ts file:
<div cdkDrag (cdkDragStarted)="dragStart($event)"></div>
In your .ts file, you can then toggle the cursor behavior when a drag begins and ends:
bodyElement: HTMLElement = document.body;
dragStart(event: CdkDragStart) {
this.bodyElement.classList.add('inheritCursors');
this.bodyElement.style.cursor = 'move';
//replace 'move' with your desired cursor type
}
drop(event: CdkDragDrop<string[]>) {
this.bodyElement.classList.remove('inheritCursors');
this.bodyElement.style.cursor = 'unset';
...
...
}
Check out this live example on StackBlitz for reference.
I hope this information proves useful! 👨💻