Repository navigation
Fix #359: web drops land in the document they were dropped on - #375
Merged
Merged
Conversation
The web reads dropped files asynchronously, and the place inbox only kept the drop point, so a file dropped on document A was placed into whatever document was active when its bytes arrived. A drop on a canvas now carries place::DropAt (the document's uid, the point, embed), and drop_files makes that document active again before placing; when it has closed meanwhile, nothing is placed and the status bar says so. The native drop path is synchronous and goes through the same code, so it is unchanged in effect. Test: a drop pending while another document opens lands in the first one at the drop point; one whose document closes is not placed anywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bflatastic
force-pushed
the
fix/issue-359
branch
from
October 7, 2026 22:32
c1251fc to
accfec7
Compare
Member
Author
|
Full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the web, a file dropped on a canvas now lands in the document it was dropped on, even if another document became active while the browser was still reading it.
place::DropAt(document uid, drop point, embed) replaces the bare(Point, bool)inDropTarget::PlaceandPlaceArrival, so the pending drop remembers its document.place::drop_filesmakes that document active again before placing (dialogs for PDFs, DXF and text then open over it too); if it closed meanwhile, nothing is placed and the status bar says so.a_file_read_after_another_document_became_active_lands_where_it_was_dropped: a drop pending while another document opens lands in the first one at the drop point, and one whose document closes is placed nowhere (fails without the fix: the image went into the newer document).docs/development.md(web drag-and-drop) and the ROADMAP platforms row mention it.Checks
9ee0c428(origin/main).cargo fmt --all;cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings;cargo clippy -p vectorcraft-web --target wasm32-unknown-unknown -- -D warnings.cargo test -p vectorcraft-ui-egui --lib: 589 passed.cargo xtask layers,cargo xtask brands,cargo xtask wasm: ok.cargo check -p vectorcraft-ui-eguiforx86_64-unknown-linux-gnuandaarch64-apple-darwin: ok.File.arrayBuffer); covered by the headless frame test through the real place inbox.🤖 Generated with Claude Code