- 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
HTML5 drag and drop will not drop
It is because there is no dragover event handler; however, default event handler of dragover event is used. After that, no drop event is triggered.
e.preventdefault is needed for dragover event before drop event.
If you want to allow a drop, then default handler is prevented for canceling the event. This can be done either by returning false from an attribute-defined event listener or by calling events event.prevent default method.
<div ondragover = "return false"> <div ondragover = "event.preventDefault()">
False is returned when the division has dragover as property.
The default is prevented.
Advertisements
To Continue Learning Please Login
Login with Google