mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
editor drag and drop mitigation for resources without scheme (#124946)
This commit is contained in:
parent
bae654ad1d
commit
88875325a7
|
@ -75,7 +75,11 @@ export function extractEditorsDropData(e: DragEvent, externalOnly?: boolean): Ar
|
|||
const rawResourcesData = e.dataTransfer.getData(DataTransfers.RESOURCES);
|
||||
if (rawResourcesData) {
|
||||
const resourcesRaw: string[] = JSON.parse(rawResourcesData);
|
||||
editors.push(...resourcesRaw.map(resourceRaw => ({ resource: URI.parse(resourceRaw) })));
|
||||
for (const resourceRaw of resourcesRaw) {
|
||||
if (resourceRaw.indexOf(':') > 0) { // mitigate https://github.com/microsoft/vscode/issues/124946
|
||||
editors.push({ resource: URI.parse(resourceRaw) });
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// Invalid transfer
|
||||
|
|
Loading…
Reference in a new issue