0

enter image description here

I am creating an application in C# that will support drag and drop on Edge browsers. From C# application on drag, I am customizing cursor icon, and I want to retain this cursor icon until drop happened on a browser. For drag and drop support on Edge browser I have written a browser Extension, and from that extension, I am using below event handler to customizing copy icon

document.addEventListener("dragenter", function( event ) 
{
    event.preventDefault();
    event.dataTransfer.effectAllowed = "copy";
}, false);

(dragstart is not being called because I am dragging the cursor icon from C# application)

My custom icon is appearing on Edge and a default icon of edge copy/move is also appearing(screenshot attached Two icons - one is from C# app and second from the edge).

So I am facing to issue to remove the browser default icon in Edge.

p u
  • 1,395
  • 1
  • 17
  • 30
jai
  • 1
  • 1
  • I am not able to see your screenshots. can you please again try to attach it? Also I suggest you to provide a sample project or detailed steps to reproduce the issue on our end. We will try to check what you are doing actually in your code to replace the default icon with your custom icon. It can help us to understand your issue in better way. Thanks for your understanding. – Deepak-MSFT Dec 14 '18 at 02:03
  • You can possibly use setDragImage and set an empty image. I have no way of testing on Edge, so I'm leaving this as a comment. https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage – NikxDa Dec 14 '18 at 04:42

0 Answers0