fix(ui): fix drag-and-drop on Windows and catalog rail layout#24
Merged
Conversation
- Set dragDropEnabled: false in tauri.conf.json so WebView2 doesn't intercept OS-level drag events, allowing HTML5 dragover/drop to fire - Fix catalog-rail background not filling full panel height by adding grid-template-rows: 1fr and explicit grid-column/row placement on rail and main, preventing catalog-main from wrapping to an implicit row in the collapsed state - Restore dropOnFolder and getDraggedTrackId to accept explicit trackId and text/plain fallback for cross-origin dataTransfer in WebView2 - Add wireRailLibraryDrop so tracks can be dragged from trash back to library by dropping on the Library rail button
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.
Summary
dragDropEnabled: falseintauri.conf.json— WebView2 was intercepting OS-level drag events before they reached the HTML page, silently swallowing alldragover/dropevents. This is the documented requirement for HTML5 DnD on Windows in Tauri v2.catalog-maininto an implicit grid row in the collapsed state, stealing height from the1frrow and leaving the rail background short. Fixed by pinning both children to explicitgrid-column/grid-rowand addinggrid-template-rows: 1frto the catalog grid.dropOnFolder/getDraggedTrackIdhardening — accepts an explicittrackIdargument and atext/plainfallback for WebView2's cross-origindataTransferrestrictions.Test plan