Droppables: Inconsistent order of over/out events

Droppables: Inconsistent order of over/out events


We've observed some strange behaviour with our application, and it
seems to stem from inconsistencies in the order of arrival of
droppable over and out events.
The problem occurs quite regularly in our application, but less so in
the demo file. It is possible to reproduce the issue using the
following page (although it is intermittent, and tricky):
http://anastasia.atrc.utoronto.ca/jquery-testing/ui/demos/ui.droppable.html
(This file is a slight modification of the droppable demo file from
trunk: the other examples have been removed, and the outer droppable
has been converted to a table cell (<td>) to replicate the environment
we've observed the problem in. We've also added console.log()
statements to the JS).
To view this, you need to be able to see the console logs (e.g. using
Firebug in Firefox).
To reproduce, watch the console logs as you do the following:
- pick up the draggable and drag it over top of one of the nested
droppables (but don't drop it)
- while continuing to NOT drop the draggable, move it quickly back and
forth from one nested droppable to the other
If you watch the console logs, you will see the various over and out
events on the three droppables. While the problem only occurs
occasionally, the main one you will see is that the over and out on
the outer droppable ("droppable-greedy-true") come in the wrong order
as you pass over the space between the two nested droppables: the out
comes first, then the over. Sometimes, the over on the outer droppable
actually comes after the over on the nested droppable as you move from
the former to the latter.
Less frequent and more difficult to reproduce: Moving similarly
between the outer and nested droppable: The order in which the over
and out events (as you move from one droppable to another) changes.
Why does this matter, you ask?
We want to use the over and out events to trigger things like hiding
and showing a custom drop marker. When they arrive in the wrong (or
unpredictable order), then the drop marker becomes very confused.
Has anyone observed this, and does anyone have any suggestions for
dealing with it?
--
Anastasia Cheetham a.cheetham@utoronto.ca
Software Designer, Fluid Project http://fluidproject.org
Adaptive Technology Resource Centre / University of Toronto
It's not reality that's important,
but how you perceive things.