5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 09:19:17 +08:00

fix: compute dropped file path before css handling (#3595)

* fix: compute dropped file path before css handling

* udpate changelog

* Update website/src/pages/changelog.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Francesco Luzzi 2024-07-10 07:00:19 +02:00 committed by GitHub
parent 3204287f96
commit ffcfa1b0e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 18 deletions

View File

@ -130,16 +130,6 @@ function onDrop(e) {
}
e.preventDefault();
if (!flags.useDropTarget) {
return;
}
// Trigger debounce function to deactivate drop targets
if(flags.nextDeactivate) flags.nextDeactivate();
// Deactivate all drop targets
Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach(el => el.classList.remove(DROP_TARGET_ACTIVE));
if (CanResolveFilePaths()) {
// process files
let files = [];
@ -154,6 +144,16 @@ function onDrop(e) {
}
window.runtime.ResolveFilePaths(e.x, e.y, files);
}
if (!flags.useDropTarget) {
return;
}
// Trigger debounce function to deactivate drop targets
if(flags.nextDeactivate) flags.nextDeactivate();
// Deactivate all drop targets
Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach(el => el.classList.remove(DROP_TARGET_ACTIVE));
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed file drop events on windows. Fixed in [PR](https://github.com/wailsapp/wails/pull/3595) by @FrancescoLuzzi
+ Fixed file drop events on Windows in [PR](https://github.com/wailsapp/wails/pull/3595) by @FrancescoLuzzi
## v2.9.1 - 2024-06-18
### Fixed