From f8c86112192b0d7cdb6e663aa5c7c5afa2d11f46 Mon Sep 17 00:00:00 2001 From: Mohamed Feddad Date: Sun, 25 Aug 2024 14:16:09 +0400 Subject: [PATCH] Fix drag and drop missing cursor icon (#3703) * fix: darg and drop missing cursor icon * chore: update change log --- v2/internal/frontend/runtime/desktop/draganddrop.js | 1 + v2/internal/frontend/runtime/runtime_debug_desktop.js | 1 + website/src/pages/changelog.mdx | 1 + 3 files changed, 3 insertions(+) diff --git a/v2/internal/frontend/runtime/desktop/draganddrop.js b/v2/internal/frontend/runtime/desktop/draganddrop.js index 1582df6d4..45a047b5f 100644 --- a/v2/internal/frontend/runtime/desktop/draganddrop.js +++ b/v2/internal/frontend/runtime/desktop/draganddrop.js @@ -51,6 +51,7 @@ function onDragOver(e) { if (!window.wails.flags.enableWailsDragAndDrop) { return; } + e.dataTransfer.dropEffect = 'copy'; e.preventDefault(); if (!flags.useDropTarget) { diff --git a/v2/internal/frontend/runtime/runtime_debug_desktop.js b/v2/internal/frontend/runtime/runtime_debug_desktop.js index 5e95680b8..d6b66521f 100644 --- a/v2/internal/frontend/runtime/runtime_debug_desktop.js +++ b/v2/internal/frontend/runtime/runtime_debug_desktop.js @@ -454,6 +454,7 @@ if (!window.wails.flags.enableWailsDragAndDrop) { return; } + e.dataTransfer.dropEffect = 'copy'; e.preventDefault(); if (!flags.useDropTarget) { return; diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 13c67172c..89c96b82b 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added nil check for Drag-n-Drop on Windows. Fixed by in [PR](https://github.com/wailsapp/wails/pull/3597) by @leaanthony based on the suggestion by @Alpa-1 in [#3596](https://github.com/wailsapp/wails/issues/3596). - Fixed typos in various .mdx files. [PR #3628](https://github.com/wailsapp/wails/pull/3628) by [@deining](https://github.com/deining) - Fixed `notifyListeners()` race condition when terminated mid-emission [PR](https://github.com/wailsapp/wails/pull/3695) by [@mrf345](https://github.com/mrf345) +- Fixed drag and drop missing cursor icon [PR](https://github.com/wailsapp/wails/pull/3703) by [@mrf345](https://github.com/mrf345) ## v2.9.1 - 2024-06-18