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

Regarding drag drop feature in vscode webview #96967

Closed
Uma19 opened this issue May 5, 2020 · 2 comments
Closed

Regarding drag drop feature in vscode webview #96967

Uma19 opened this issue May 5, 2020 · 2 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Uma19
Copy link

Uma19 commented May 5, 2020

Hi team

@mjbvz

I am reopening my issue with the below details that I would like to share, since my issue got closed assuming its a duplicate ( but its seems to be not )

Existing issue reference : #96770

This feature was supported till 1.39.2 version of vscode and then later onwards this stopped working

In 1.44.2 version
Please find the below suspected codes that is responsible for the issue that I am raising. and the same code doesn't exist in 1.39.2 where my functionality was working

From the below code => it seems to be it creates an overlay within editor part
https://github.com/microsoft/vscode/blob/1.44.2/src/vs/workbench/browser/parts/editor/editorPart.ts
//#region TODO@matt this should move into some kind of service

createEditorDropTarget(container: HTMLElement, delegate: EditorDropTargetDelegate): IDisposable {
return this.instantiationService.createInstance(EditorDropTarget, this, container, delegate);
}

//#endregion
https://github.com/microsoft/vscode/blob/1.44.2/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts

windowDidDragStart(): void {
// Webview break drag and droping around the main window (no events are generated when you are over them)
// Work around this by disabling pointer events during the drag.
// electron/electron#18226
if (this.element) {
this.element.style.pointerEvents = 'none';
}
}

windowDidDragEnd(): void {
if (this.element) {
this.element.style.pointerEvents = '';
}
}
https://github.com/microsoft/vscode/blob/1.44.2/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts

windowDidDragStart() {
this.withWebview(webview => webview.windowDidDragStart());
}

windowDidDragEnd() {
this.withWebview(webview => webview.windowDidDragEnd());
}
And in 1.39.2 version you will NOT find the similar kind of codes exist in the respective file

https://github.com/microsoft/vscode/blob/1.39.2/src/vs/workbench/browser/parts/editor/editorPart.ts
https://github.com/microsoft/vscode/blob/1.39.2/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts

And the one that I have raised is different than the one that you have mentioned as duplicated issue
#8794

As in this , the user is trying to drag the button within the webview itself , whereas in my case I am trying to drag the items that is part of VSCODE menu items to the EDITOR panel

@mjbvz
Copy link
Collaborator

mjbvz commented May 5, 2020

We never intentionally supported your use case. It worked before because VS Code 1.39 had a bug where you could not drag editors to start new groups. Fixing that bug was more important that being able to drag and drop files into webviews

@mjbvz mjbvz closed this as completed May 5, 2020
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label May 5, 2020
@Axosoft-Ashley
Copy link

Axosoft-Ashley commented May 12, 2020

I also have this problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants