Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

On changePage with reloadPage: true pageInit its applied to the current page in the DOM not the reloaded one #5002

Open
gheiler opened this Issue · 2 comments

3 participants

@gheiler

This is a tricky one, suppose you load a page, that page has a pageinit event binded that does something (in my example writes some html), then you change to another page, and as expected your last page its still in the DOM. So now if you want to go back to that page using changePage with the option reloadPage: true, the pageInit event that should be executed on the new reloaded page executes in the one that was already in the DOM. Of course you can avoid this by removing the conflicting page once you change the page the first time but that's just an ugly fix.

Here jsbin to demonstrate:

http://jsbin.com/welcome/22772

Always nice to say your doing a magnificent job!

@TeckFA

Is this a jQM design issue, possibly remaining one for while?

(In our case, the pageinit executed in that other page means that handlers cannot call method "refresh" on a freshly modified listview, as that page would still be missing its "pageinit"...)

@gabrielschulhof
Collaborator

This is indeed a design issue and will likely remain this way. The initial page is never removed from the DOM, even if reloadPage is specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.