Chrome: Emails removal issue from Outlook after drag and drop

Author - Nipun Negi
15.01.2020
|
0 Comments
||

Emails removal issue from Outlook after drag and drop operation in Chrome

The latest versions of Microsoft Edge and Chrome incorporates the ability to drag and drop an email directly from Outlook into the browser without the need of any third-party plugins like Outlook2Web. The feature to copy a received email from Outlook to a web application by performing drag and drop operation with the help of JS events such as ondrop, ondragenter, ondragleave, ondragover works fine. But there is an emails removal issue in Chrome(Chromium browsers) where the emails get deleted automatically when a drag-drop operation is performed on emails from Outlook to the web application in Chrome.
emails removal

The emails get deleted from Outlook due to the dropEffect being set as ‘move’ but as per the drop effect, the emails are getting moved from Outlook to the web application. But if we change the drop effect property from ‘move’ to ‘copy’, then the drag-drop operation drops a copy of Outlook email in web application in Chrome.

The potential code example to resolve the issue is written below:-

<div  id="dragdropdiv"
         ondrop="onDrop(event)"
         ondragleave="onDragLeave(event)"
         ondragover="onDragOver(event)" ondragenter="onDragEnter(event)">
</div>
function onDragOver(ev) {
    ev.preventDefault();
    ev.dataTransfer.dropEffect = "copy";
 }

With these changes being done everything will work fine in Chrome related browsers.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *