function Element.isParent argument order?

azaozz
Sun, 24 Jun 2007 23:20:59 -0000

I was trying to troubleshoot "jumpy" Sortables and noticed that when
the function Element.isParent is called from onHover (line 749 in
dragdrop.js v. 1.7.1_beta3) and from onEmptyHover (line 781), the
arguments seem to be in reverse order.

Element.isParent (line 944) expects "child, element(parent)" but is
called with "dropon(parent), element(child)", making it return FALSE
most of the time, when (I think) it should be returning TRUE...

Reversing the arguments order on lines 749 and 781 to
"Element.isParent(element, dropon)" fixes any "jumpiness" in
horizontally arranged Sortables when they overflow on more than 1 line
( I use about 60 small ones - 20x20px and they overflow on 4-5 lines).