-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[V3] windows: fix html #4259
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: v3-alpha
Are you sure you want to change the base?
[V3] windows: fix html #4259
Conversation
WalkthroughThe update modifies the logic for handling drag-and-drop functionality in the Windows-specific implementation of a webview window. The call to disable external drag via Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
v3/pkg/application/webview_window_windows.go (1)
1716-1724
: Consider cleaning up commented-out code.This commented block contains similar drag-and-drop functionality to what's implemented above. Since it's not being used, it's creating unnecessary code noise.
- // We will get round to this - //if chromium.HasCapability(edge.AllowExternalDrop) { - // err := chromium.AllowExternalDrag(w.parent.options.EnableDragAndDrop) - // if err != nil { - // globalApplication.handleFatalError(err) - // } - // if w.parent.options.EnableDragAndDrop { - // chromium.MessageWithAdditionalObjectsCallback = w.processMessageWithAdditionalObjects - // } - //}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
v3/pkg/application/webview_window_windows.go
(1 hunks)
🔇 Additional comments (1)
v3/pkg/application/webview_window_windows.go (1)
1651-1656
: Good fix - this resolves HTML drag and drop functionality while preserving Windows file drag and drop support.The change correctly moves the
AllowExternalDrag(false)
call inside theEnableDragAndDrop
conditional block, which ensures that HTML drag and drop operations are only disabled for applications that explicitly need Windows-level file drag and drop support.Previously, HTML drag and drop was disabled for all applications regardless of whether they needed Windows file drag and drop, which caused the issue described in the PR.
|
Description
HTML drag and drop didn't work, and it looks like that's because
chromium.AllowExternalDrag(false)
is being called on any and all apps. I found this issue which talks about disabling ExternalDrag for apps that want windows level file drag and drop, so I assume that's why that line is being called. For now, without further understanding windows level drag and drop I figured we can disable external drag only when the app should respect windows level drag and drop.I will add that the example for drag and drop worked even without disabling ExternalDrag, do we might not need this at all.
Fixes # (issue)
Type of change
Please select the option that is relevant.
How Has This Been Tested?
ran the two dnd examples in v3/examples
If you checked Linux, please specify the distro and version.
Test Configuration
Checklist:
website/src/pages/changelog.mdx
with details of this PRSummary by CodeRabbit