Skip to content
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

fix: compute dropped file path before css handling #3595

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions v2/internal/frontend/runtime/desktop/draganddrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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));
}

/**
Expand Down
14 changes: 7 additions & 7 deletions v2/internal/frontend/runtime/runtime_debug_desktop.js

Large diffs are not rendered by default.

Loading