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

Only execute file open command during drag-and-drop for dragged files #9093

Merged

Conversation

slhultgren
Copy link
Contributor

What it does

Fix for DnD files to main area #8739

Solves issue introduced in f840f60

Contributed by STMicroelectronics
Signed-off-by: Samuel HULTGREN samuel.hultgren@st.com

How to test

1, Select text in the "Problems" view, drag into the main area
2, Observe crash in the developer console without the patch:

command.ts:298 Uncaught (in promise) Error: The command 'navigator.open' cannot be executed. There are no active handlers available for the command.
    at CommandRegistry.<anonymous> (command.ts:298)
    at step (command.ts:15)
    at Object.next (command.ts:15)
    at command.ts:15
    at new Promise (<anonymous>)
    at ../../packages/core/lib/common/command.js.__awaiter (command.ts:15)
    at CommandRegistry.../../packages/core/lib/common/command.js.CommandRegistry.executeCommand (command.ts:290)
    at FileNavigatorWidget.<anonymous> (navigator-widget.tsx:110)
    at step (navigator-widget.tsx:15)
    at Object.next (navigator-widget.tsx:15)

Review checklist

Reminder for reviewers

Fix for DnD files to main area eclipse-theia#8739

Solves issue introduced in f840f60

Contributed by STMicroelectronics
Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
@vince-fugnitto vince-fugnitto added the dnd issues related to drag & drop label Feb 19, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirmed that the pull-request:

  • fixes the error when attempting to dnd into the main-area not part of the nav
  • the dnd of nav nodes still works correctly (single or multiple files)

@vince-fugnitto vince-fugnitto merged commit 925520e into eclipse-theia:master Feb 23, 2021
@paul-marechal paul-marechal added this to the 1.11.0 milestone Feb 25, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants