enyojs/moonstone — pull request #1655 by aarontam (2014-09-25 01:26:28+00:00)
Title: BHV-11985: Only stop marquee when blurring the control that the marquee was initiated on.

### Issue
Due to a change in the ordering of `Spotlight` focus/blur events, when moving between synchronized marquees (i.e. marquees in the same `moon.MarqueeDecorator` control or a control that has mixed in `MarqueeSupport`), the currently focused marquee will not start. This is caused by the fact that `unspot` is called for the previously focused marquee, which results in an `onSpotlightBlur` event being fired after an `onSpotlightFocus` event is fired (for the currently focused marquee). So effectively the marquee job is cancelled right after it's started.

### Fix
To guarantee that we are stopping the marquee job appropriately, we check that the control that originated the `onSpotlightFocus` event is the same as the control that is originating the `onSpotlightBlur` event. As the originating control changes when focus moves between marquee controls that are synchronized, this should guarantee that the corresponding `onSpotlightBlur` event will be fired from the last focused control. I tested this with the sample and didn't run into any issues, but please poke holes in this logic if possible.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam