in partnership with mediatemple

Ticket #937 (closed defect: invalid)

Opened 2 months ago

Last modified 2 days ago

emptydrop does not fire properly when clone doesnt move

Reported by: phillc Owned by:
Type: defect Priority: minor
Milestone: Mootools version 1.2 Component: Plugins
Keywords: Cc:

Description

window.addEvent('domready', function(){

$$('.choice').each(function(choice){

choice.addEvent('mousedown', function(e)

{

e = new Event(e).stop();
var clone = this.clone()

.setStyles(this.getCoordinates())
.setStyles({'opacity': 0.7, 'position': 'absolute'})
.addEvent(

'emptydrop', function()
{

this.remove();

}

).inject(document.body);

var drag = clone.makeDraggable({});



drag.start(e);

});

});

});

if you just click and do not drag, the cloned element does not fire a emptydrop.
worked correctly in 1.11

Change History

Changed 2 months ago by phillc

  • owner deleted
  • component changed from Core to Plugins

Changed 2 days ago by tomocchino

  • status changed from new to closed
  • resolution set to invalid

This is desired behavior... the dragging does not start until the user drags past the 'snap' option threshold. This prevents superfluous clicks from triggering emptydrop events.

Also, the emptydrop event has been removed in favor of a drop event in the class. If no droppable is passed to the event, it means the draggable was not dropped on any of the droppables.

Note: See TracTickets for help on using tickets.