Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 11, 2025

Fixes #6953

This PR removes the shift key requirement that was preventing users from dragging and dropping images into the Roo Code prompt field.

The issue was caused by a check in the onDragOver event handler that required the Shift key to be held. This has been removed to restore the expected drag-and-drop behavior.

All tests pass and the functionality now works as expected.


Important

Removes shift key requirement for drag-and-drop in ChatTextArea.tsx, allowing image/file drops without it.

  • Behavior:
    • Removes shift key requirement in onDragOver event handler in ChatTextArea.tsx.
    • Allows drag-and-drop of images/files without holding the shift key.
  • Testing:
    • All tests pass, confirming expected functionality.

This description was created by Ellipsis for 0bb89a5. You can customize this summary. It will automatically update as commits are pushed.

Fixes #6953 - Users can now drag and drop images into the prompt field
without holding the Shift key. This restores the expected behavior where
drag-and-drop works naturally for image files.
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 11, 2025 21:12
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Aug 11, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own code is like looking in a mirror after writing it blindfolded.

return
}

e.preventDefault()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! This removes the unnecessary shift key requirement that was blocking normal drag-and-drop behavior. However, was this shift key check originally added for a specific UX reason (e.g., to prevent accidental drops)? If so, we might want to document why we're removing it now.


e.preventDefault()
setIsDraggingOver(true)
e.dataTransfer.dropEffect = "copy"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding tests for drag-and-drop functionality to prevent regression. While the PR mentions tests pass, I don't see specific tests covering this drag-and-drop behavior.

@roomote roomote bot mentioned this pull request Aug 11, 2025
@mrubens mrubens closed this Aug 11, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 11, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Cannot add images

3 participants