-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix image drop from main editor #8339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix image drop from main editor #8339
Conversation
…-image-drop-from-main-editor
…-image-drop-from-main-editor
…-image-drop-from-main-editor
…aadarshkt/continue into fix-image-drop-from-main-editor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 8 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="gui/src/components/mainInput/TipTapEditor/utils/editorConfig.ts">
<violation number="1" location="gui/src/components/mainInput/TipTapEditor/utils/editorConfig.ts:166">
Preventing default before checking the payload swallows non-image drops; plain-text drag-and-drop now does nothing. Only block the event when you actually handle it, or fall back to the default insertion flow.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
model.capabilities, | ||
) | ||
) { | ||
event.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preventing default before checking the payload swallows non-image drops; plain-text drag-and-drop now does nothing. Only block the event when you actually handle it, or fall back to the default insertion flow.
Prompt for AI agents
Address the following comment on gui/src/components/mainInput/TipTapEditor/utils/editorConfig.ts at line 166:
<comment>Preventing default before checking the payload swallows non-image drops; plain-text drag-and-drop now does nothing. Only block the event when you actually handle it, or fall back to the default insertion flow.</comment>
<file context>
@@ -147,6 +148,80 @@ export function createEditorConfig(options: {
+ model.capabilities,
+ )
+ ) {
+ event.preventDefault();
+ event.stopPropagation();
+ return true;
</file context>
Description
Removed console log and changed launch configuration
AI Code Review
@continue-review
Checklist
Screen recording or screenshot
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Fixes image drag-and-drop in the main editor. Drops now work for files and for images dragged from VS Code (vscode-resource URLs), which are read and inserted as data URLs.
Bug Fixes
Refactors