

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The dragLeave event fires before drop for HTML5 drag and drop events
To solve this issue for drag and drop event, dragLeave fires before drop sometimes:
onDragOver = function(e) { e.stopPropagation() } onDrop = function(e) { /* for drop */ }
Under drop, you can set this:
function drop(ev) { event.preventDefault(); var data=event.dataTransfer.getData("Text"); event.target.appendChild(document.getElementById(data)); }
- Related Questions & Answers
- HTML5 drag and drop will not drop
- How to use drag and drop in HTML5?
- How to simulate HTML5 Drag and Drop in Selenium Webdriver?
- Drop target listens to which events in HTML5?
- HTML5 Canvas and select / drag-and-drop features in a JS library?
- Cross-browser drag-and-drop HTML file upload?
- How to use drag and drop in Android?
- How to work with JavaScript Drag and drop for touch devices?
- Full page drag and drop files website with HTML
- How to do drag and drop action in Selenium?
- Drag and Drop a File feature in React JS
- How to perform drag and drop actions in WebdriverIO?
- Drop Shadow with HTML5 Canvas
- JavaScript File Drop with HTML5
- How to perform drag and drop operation in Selenium with python?
Advertisements