From 14f0f0f3cbee6859e895881329717774f61db3d2 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 1 Jun 2025 07:38:40 -0700 Subject: [PATCH] handle chrome->firefox --- src/scripts/app.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 772caf3d87..f45c6fc457 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -468,6 +468,19 @@ export class ComfyApp { event.dataTransfer ) await this.handleFile(resolvedFile) + } else { + // Try loading the first URI in the transfer list (handles Chrome->Firefox BMP case) + const validTypes = ['text/uri-list', 'text/x-moz-url'] + const match = [...event.dataTransfer.types].find((t) => + validTypes.find((v) => t === v) + ) + if (match) { + const uri = event.dataTransfer.getData(match)?.split('\n')?.[0] + if (uri) { + const blob = await (await fetch(uri)).blob() + await this.handleFile(new File([blob], uri, { type: blob.type })) + } + } } } catch (err: any) { useToastStore().addAlert(