View Full Version : [FIXED] [4.2] Ext.dd.DragZone doesn't honour return of template method beforeInvalidDrop

4 Apr 2013, 8:07 AM
http://docs.sencha.com/ext-js/4-2/#!/api/Ext.dd.DragSource-method-beforeInvalidDrop states you can return false to cancel the processing of an invalid drop yet the calling code:

// @private
onInvalidDrop: function(target, e, id) {
// This method may be called by the DragDropManager.
// To preserve backwards compat, it only passes the event object
// Here we correct the arguments.
if (!e) {
e = target;
target = null;
id = e.getTarget().id;
this.beforeInvalidDrop(target, e, id);
if (this.cachedTarget) {
this.cachedTarget.notifyOut(this, e, this.dragData);
this.cacheTarget = null;
this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this);

if (this.afterInvalidDrop) {
* An empty function by default, but provided so that you can perform a custom action
* after an invalid drop has occurred by providing an implementation.
* @param {Event} e The event object
* @param {String} id The id of the dropped element
* @method afterInvalidDrop
this.afterInvalidDrop(e, id);

never processes the return type.

4 Apr 2013, 10:16 AM
Thanks for the report! I have opened a bug in our bug tracker.