mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 11:10:47 +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:
parent
3204287f96
commit
ffcfa1b0e7
@ -130,16 +130,6 @@ function onDrop(e) {
|
|||||||
}
|
}
|
||||||
e.preventDefault();
|
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()) {
|
if (CanResolveFilePaths()) {
|
||||||
// process files
|
// process files
|
||||||
let files = [];
|
let files = [];
|
||||||
@ -154,6 +144,16 @@ function onDrop(e) {
|
|||||||
}
|
}
|
||||||
window.runtime.ResolveFilePaths(e.x, e.y, files);
|
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
@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## v2.9.1 - 2024-06-18
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
Loading…
Reference in New Issue
Block a user