feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

The screen ID does not change when you return the Navigator to the previous screen after interaction start #1715

Closed denisgl7 closed 6 years ago

denisgl7 commented 6 years ago

screenNavigator = new StackScreenNavigator();
screenNavigator.isSwipeToPopEnabled = true;
screenNavigator.addEventListener(FeathersEventType.END_INTERACTION, endInteraction_listener);
private function endInteraction_listener(event:Event):void
{
    trace(screenNavigator.activeScreenID)
}

If I go to the next screen, then everything works fine If I start the transition, but return to the initial screen, screenID is still equal to 'Next screen' Is this behavior correct?

joshtynjala commented 6 years ago

The active screen is not guaranteed to have changed until Event.CHANGE is dispatched. Does Event.CHANGE get correctly dispatched after FeathersEventType.END_INTERACTION?

denisgl7 commented 6 years ago
screenNavigator.addEventListener(Event.CHANGE, change_listener);

In this case, the next screen will be displayed when the interaction starts. But if you do not finish the transition and return to the previous screen, trace does not display anything