enyojs/enyo — pull request #862 by graynorton (2014-09-24 16:34:03+00:00)
Title: ENYO-269: Add retainNode feature to enyo.Control

When using a virtualized list or repeater, a gesture may originate
with a DOM node that ends up being destroyed in mid-gesture. This
stops the stream of DOM events representing the gesture and will
generally halt the action being taken in response to the gesture
(or otherwise break the behavior).

The solution in this case is to keep the original DOM node around
until the gesture is complete. We have had a point solution in
enyo.List for some time (to support drag-to-reorder), but we now
have a similar need related to Garnet's wheel controller, which
is used (among other purposes) to scroll virtual lists based on
enyo.DataList and enyo.DataGridList.

The retainNode feature on enyo.Control is intended to generalize
the solution so that it can be shared across similar use cases.
I have tested this against both enyo.List (where I've used it to
replace the existing point solution) and the Garnet wheel
controller / DataList.

The functionality hooks into Control.teardownRender(), which is
used by all of our current virtualized list implementations to
remove nodes.

Enyo-DCO-1.1-Signed-Off-By: Gray Norton (gray.norton@lge.com)