dragevents2 Improved dragenter and dragexit events
Features:
- Pure javascript, no jQuery required
- Allows nesting of event listeners
- Intuitive:
- If the dragged object enters an inner listener, the outer listener always fires before the inner listener
- If the dragged object leaves an inner listener, the inner listener always fires before the outer listener
- Events always propogate. Dragevents2 will not interfere with most other events.
Demo using dragevents 2: 3 nested div's
Without dragevents2:
Undesired behavior with classic dragenter and dragleave, fixed by dragevents2
- If you enter B through A, A is exited.
- If you enter A through B, A is entered again.