Webview2 DragDrop/DragEnter Events #3973
Replies: 4 comments
-
Hi senstar-mhuang. WebView2 does not currently support Drag and Drop, though it is being worked on. Unfortunately no general workarounds come to mind. We are not suppressing drag/drop handler internally so we can't undo that for you. What are you trying to accomplish with the custom drag/drop handler? |
Beta Was this translation helpful? Give feedback.
-
Hi johna-ms, Is there any support for Drag and Drop feature of image files in HTML page which is shown in WebView2. |
Beta Was this translation helpful? Give feedback.
-
@RatheeshVA this should only be broken for WinUI platforms. Support for that is being worked on as I mentioned above |
Beta Was this translation helpful? Give feedback.
-
@johna-ms I am having one more doubt.
myScript.js - I defined functions to drag image file from one source to dest on Left mouse button click.
But in WebView2, currently I could not able to do so by defining the functions in onclick or ondblclick in html page. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a .NET C# Webview2 control that's been properly initialized and showing a webpage, whose parent is a custom control. In our application, there are draggable objects that we handle with the Forms.Control.DragDrop and DragEnter events.
this.m_webBrowser.DragDrop += new System.Windows.Forms.DragEventHandler(this.BrowserPanel_DragDrop); this.m_webBrowser.DragEnter += new System.Windows.Forms.DragEventHandler(this.BrowserPanel_DragEnter)
These events fire correctly in our other custom controls that inherit the Control class but they don't seem to fire when the same objects are dragged over the Webview2 control. Is this by design, i.e does Webivew2 have its own drag handling and/or suppresses these events manually? If so, is there a way to disable this behavior (as I would like to implement custom drag/drop events)?
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions