Ext JS 4 Custom Drag and Drop does not work as expected

Ext JS 4 Custom Drag and Drop does not work as expected

There is a strange behaviour with this code using ExtJS 4. After dragging the drag element inside the drop zone it is nearly impossible to drag the element back to its original position. It seems that there is a problem with the positioning. Maybe you have to test the code with 3.2 and 4.07 to see the behaviour. Same with the custom drag and drop example at http://www.sencha.com/blog/5-steps-t...p-with-ext-js/ It will work with ExtJS 3 but strange behaviour with 4.07

I think it could be a bug inside Ext.dd.DD. Maybe alignElWithMouse() has a bug.

The problem is the relative positioning with fly.setLeftTop() and Math.max() with a value of 0. Math.max() with 0 never can be negative so it is not possible to move a drag item to the top(up) or to the left side. Simply removing Math.max() with 0 would do the trick.