- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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)); }
Advertisements