dmachi / dojox_application

Dojox Application Framework for mobile, tablets, and desktops
Other
27 stars 24 forks source link

There is a problem with the Transition controller when transitioning across nested views. #204

Closed edchat closed 11 years ago

edchat commented 11 years ago

I had a couple of people complain about two related problems. One was the problem we have seen before where data from a previous view would show up for a second before being replaced by the new data for a view. We have worked around this problem before by setting visibility : hidden on afterDeactivate, and setting it to visible on beforeActivate.
And the other problem reported had to do with a double transition which is sometimes seen when transitioning to a nested view.
Actually both of these problems have the same root cause.

The problem occurs when a sequence of transitions like this is done: 1) transition to "other,OtherView1", 2) transition "back" (where back takes you out of the other view) and then 3) transition to "other,OtherView2".

The double transition happens when doing the transition to "other,OtherView2", because on the transition to the parent view "other" it is still showing "OtherView1" from the previous view, so you see OtherView1 before it transitions to "OtherView2".

The fix is to have the Transition controller process the children before doing the layout and transition for the parent.

To see the problem run the test dojox/app/tests/longListTestApp and select: 1) "Long List 1" followed by 2) "Long List 2" followed by 3) "Long List 3", You will see a double transition where you briefly see the data for "Long List 1" before it transitions to "Long List 3".

edchat commented 11 years ago

Fixed.