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 DnD of files from OS Explorer into Tree Views #12409

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

tsmaeder
Copy link
Contributor

@tsmaeder tsmaeder commented Apr 13, 2023

What it does

Fixes dragging files from the OS explorer into tree views contributed via VS Code API. The problem was caused by a wrong check in the dragOver handler in the tree view (https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/files). Also discovered that the localDataTransfer used to transfer objects within the plugin host was not cleared when first dragging locally, then from outside the Theia application.

Contributed on behalf of STMicroelectronics

Fixes #12404

How to test

We can reuse the test procedure from #12065.

Review checklist

Reminder for reviewers

Also clears "local transfers" when drag ends, preventing the items from
a previous D&D operation to spill over to the next one.

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
@msujew msujew added tree issues related to the tree (ex: tree widget) dnd issues related to drag & drop labels Apr 16, 2023
@tsmaeder tsmaeder requested a review from tortmayr April 20, 2023 10:51
Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼 Code looks good to me and I can confirm that DnD of files from the OS Explorer works as expected. Tested on Windows and Ubuntu.

@tortmayr tortmayr merged commit a84ea35 into eclipse-theia:master Apr 27, 2023
@vince-fugnitto vince-fugnitto added this to the 1.37.0 milestone Apr 27, 2023
jonah-iden pushed a commit to jonah-iden/theia that referenced this pull request May 2, 2023
…lipse-theia#12409)

Also clears "local transfers" when drag ends, preventing the items from
a previous D&D operation to spill over to the next one.

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Co-authored-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
@tsmaeder tsmaeder mentioned this pull request May 11, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dnd issues related to drag & drop tree issues related to the tree (ex: tree widget)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot DragAndDrop Files into TreeView
4 participants