Tree item dnd item for text/plain reveal it id (#168145)

Fixes #145687
This commit is contained in:
Alex Ross 2022-12-06 09:56:32 +01:00 committed by GitHub
parent 27a83dea30
commit c4d4c382c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1543,6 +1543,7 @@ export class CustomTreeViewDragAndDrop implements ITreeDragAndDrop<ITreeItem> {
this.dragCancellationToken = new CancellationTokenSource();
this.treeViewsDragAndDropService.addDragOperationTransfer(uuid, this.handleDragAndLog(this.dndController, itemHandles, uuid, this.dragCancellationToken.token));
this.treeItemsTransfer.setData([new DraggedTreeItemsIdentifier(uuid)], DraggedTreeItemsIdentifier.prototype);
originalEvent.dataTransfer.clearData(Mimes.text);
if (this.dndController.dragMimeTypes.find((element) => element === Mimes.uriList)) {
// Add the type that the editor knows
originalEvent.dataTransfer?.setData(DataTransfers.RESOURCES, '');