PDA

View Full Version : Bug in ToolbarDroppable.calculateEntryIndex()



jdemoor
16 Mar 2011, 2:12 AM
In Ext.ux.ToolbarDroppable.calculateEntryIndex(), xTotal and xHover are used in calculating the index of a dropped item. Both are horizontal pixel counts but xTotal is relative to the viewport and xHover is relative to the toolbar:



xTotal = toolbar.getEl().getXY()[0],
xHover = e.getXY()[0] - xTotal;
This is not obvious in http://dev.sencha.com/deploy/dev/examples/grid/multiple-sorting.html because the toolbar is very close to the left side of the viewport.



xTotal = toolbar.getEl().getXY()[0],
xHover = e.getXY()[0];
With the above fix, dropping items on my toolbar works as expected. Without it, items are dropped to the left of where they are expected.

jdemoor
25 Jun 2011, 7:43 AM
This bug is also in Ext4.

karlsnyder0
9 Mar 2012, 6:49 AM
I wish I had found this post before figuring out why the Toolbar Items were never dropped in the proper place. I have confirmed this a bug in Ext4.