-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
Comments
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 |
I also have this problem. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: