Skip to content

Commit 03badf1

Browse files
committed
fix(windows): disable external drag only when EnableDragAndDrop is set
1 parent 2abd05f commit 03badf1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

v3/pkg/application/webview_window_windows.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -1647,13 +1647,13 @@ func (w *windowsWebviewWindow) setupChromium() {
16471647
}
16481648
}
16491649

1650-
if chromium.HasCapability(edge.AllowExternalDrop) {
1651-
err := chromium.AllowExternalDrag(false)
1652-
if err != nil {
1653-
globalApplication.handleFatalError(err)
1654-
}
1655-
}
16561650
if w.parent.options.EnableDragAndDrop {
1651+
if chromium.HasCapability(edge.AllowExternalDrop) {
1652+
err := chromium.AllowExternalDrag(false)
1653+
if err != nil {
1654+
globalApplication.handleFatalError(err)
1655+
}
1656+
}
16571657
w.dropTarget = w32.NewDropTarget()
16581658
w.dropTarget.OnDrop = func(files []string) {
16591659
w.parent.emit(events.Windows.WindowDragDrop)

0 commit comments

Comments
 (0)