Sean,

Thanks for your answer.
I move "fromPage deleting" into an aftertransition event listener function
but this not correct the reflow.

Next, function I call on aftertransition event :

onAfterTransition : function(event) {

this.removeEventListener('aftertransition', this.onAfterTransition, false);

if (event.out) {

var parent = this.parentNode;

if (parent) {

parent.removeChild(this);

}

}

}

I also try to add setTimeout(0, but it's not working.

Have you another idea ?

2010/2/2 Sean Gilligan <[email protected]>

> Laurent wrote:
>
>> For my web-apps, I have to load all pages with ajax and I don't want to
>> keep old pages div into body.
>> To do this, I add this code add the slideDone callback function :
>>
>> var parent = fromPage.parentNode;
>> if (parent) {
>>
>>    parent.removeChild(fromPage);
>>
>> }
>>
>> But with this code, there s a reflow (the page disappear and reappear).
>>
>> Do you have any idea to upgrade this ?
>>
>
> Since you are using 0.40-dev2 you should try the afterTransition event
> callback.  Look at the file web-app/iui/js/iui-event-log.js for how to
> install event callbacks.  I'm actually thinking that the onUnload event
> should be called at the same time as afterTransition, but only for pages
> that are being unloaded (that is you are doing a backwards transition to a
> higher level of the hierarchy/pagestack)  It using the afterTransition (or
>  onUnload) events don't solve the problem it might be worth calling the
> sendEvent function from inside a setTimeout(0 function call to allow the
> browser to do a cleanup before the call.
>
> -- Sean
>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<iphonewebdev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to