Closed nickcmaynard closed 10 years ago
The suggested flow was: 1) create the view 2) make it invisible (visibility hidden) 3) initLayout 4) if transition, do initial pre-transition placement then cancel invisibility before kicking off transition 5) if no transition, then cancel invisibility
Does the problem only occur when the view is created (the first time the view is shown)? Or should we try to set visibility hidden for the view if it has already been created/loaded once?
The code you tested with only sets the visibility hidden when the view is created the first time.
I am thinking it should be setting visibility hidden on the view even if it is already been displayed.
When Gary Yoong tested the fix for this he ran into a problem with some widgets setting visibilty visible while the view was still hidden, so those fields would show up before the rest of the view. The suggested was made to try using opacity 0 instead of visibilty hidden to avoid that problem. We tested with that and it seems to work and solve his problem. Any concerns about using opacity instead of visibility?
I'm not very keen on using opacity. After all this means at least in theory that the view is still rendered just that is transparent. Not really ideal. Can't we get into the root issue instead and see why the have widgets which are forcing visibility?
Fixed with this pull request: https://github.com/dmachi/dojox_application/pull/210
Absolutely positioned views (when using CSS layout) are placed in their container with default visibility when initially created.
This creates a problem as there's a short period before the "loading" transition kicks in, and the view is "on top" of the container.
The "new" view should have visibility set to "hidden" as it's initially placed. Once it has been moved off screen, it can then be shown pre-transition.