mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 13:41:59 +00:00
## Summary - Adds a **Paste Image** context menu option to nodes that support image pasting (e.g. Load Image), complementing the existing **Copy Image** option - Reads clipboard image data via `navigator.clipboard.read()` and delegates to `node.pasteFiles()` — same path as `Ctrl+V` paste - Only shown on nodes that implement `pasteFiles` (e.g. LoadImage) - Available even when no image is loaded yet (e.g. fresh LoadImage node) - **Node 2.0 context menu only** — legacy litegraph menu is not supported - Fixes #9989 <img width="852" height="685" alt="스크린샷 2026-03-16 오후 5 34 28" src="https://github.com/user-attachments/assets/219e8162-312a-400b-90ec-961b95b5f472" /> ## Test plan - [x] Right-click a Load Image node (with or without image loaded) → verify "Paste Image" appears - [x] Copy an image to clipboard → click "Paste Image" → verify image is loaded into the node - [x] Verify "Paste Image" does not appear on output-only image nodes (e.g. Save Image, Preview Image) - [x] Unit tests pass: `pnpm vitest run src/composables/graph/useImageMenuOptions.test.ts` --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.7 KiB
1.7 KiB