claude-code - 💡(How to fix) Fix Drag-and-drop image onto prompt leaks file path into all other terminal tabs' input [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52593Fetched 2026-04-24 06:02:59
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

When Claude Code is open in multiple terminal tabs side-by-side, dragging an image onto the prompt with Shift held (to insert the file path) inserts the path into every tab's input box, not just the active one. The paths then show up when switching to the other tabs.

Root Cause

When Claude Code is open in multiple terminal tabs side-by-side, dragging an image onto the prompt with Shift held (to insert the file path) inserts the path into every tab's input box, not just the active one. The paths then show up when switching to the other tabs.

RAW_BUFFERClick to expand / collapse

Summary

When Claude Code is open in multiple terminal tabs side-by-side, dragging an image onto the prompt with Shift held (to insert the file path) inserts the path into every tab's input box, not just the active one. The paths then show up when switching to the other tabs.

Steps to reproduce

  1. Open two or more terminal tabs, each running claude in a different project/session.
  2. In tab A, Shift+drag an image file onto the Claude Code prompt to insert its path.
  3. Switch to tab B (and C, D, …).

Expected

Only tab A's prompt contains the dropped image's path.

Actual

Every other Claude Code tab's prompt also contains the dropped path(s). Over a long session, switching tabs reveals an accumulated list of image paths that were dropped into other tabs.

Environment

  • Claude Code: 2.1.118
  • macOS: 26.4.1

Notes

  • Happens consistently with multiple tabs in the same terminal window.
  • Only Shift+drag (path insertion) has been verified; not sure yet if the same happens for plain drag (image paste).

extent analysis

TL;DR

The issue can be mitigated by focusing on improving the drag-and-drop event handling in Claude Code to ensure that file paths are only inserted into the active tab.

Guidance

  • Investigate the event listeners attached to the drag-and-drop functionality in Claude Code to identify why the event is being propagated to all tabs instead of just the active one.
  • Consider adding a check to ensure that the drag-and-drop event is only handled by the currently focused tab, potentially using a focus or active tab identifier.
  • Review the code for any global event listeners that might be causing the issue and refactor them to be more specific to each tab.
  • Test the drag-and-drop functionality with plain drag (image paste) to determine if the issue is specific to Shift+drag or a more general problem.

Example

No code example is provided due to the lack of specific implementation details in the issue.

Notes

The issue seems to be related to how Claude Code handles drag-and-drop events across multiple tabs, and resolving it may require changes to the application's event handling logic.

Recommendation

Apply a workaround by modifying the drag-and-drop event handling in Claude Code to focus on the active tab, as upgrading to a fixed version is not mentioned as an option in the provided issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Drag-and-drop image onto prompt leaks file path into all other terminal tabs' input [2 comments, 2 participants]