enyojs/moonstone — pull request #1794 by dmikey (2014-11-21 22:46:43+00:00)
Title:  BHV-17974 PopUpSample: SpotlightModal doesn't retain spotlight when active

Issue.

When panels are reflowed, `finishTransition` is setting spot back on the active panel, and not on the last spotted child. However, we can not rely on sendEvents, because Card Arranger for instance does not transition by default, thus breaking the spot on card change.

Fix.

We check to see if the last spotted control is a child of the currently active panel. If it is, we spot that child, otherwise we spot the container (active panel).

Enyo-DCO-1.1-Signed-off-by: Derek Anderson