External page being reloaded when dialog closes #5239

Closed
maurice2k opened this Issue Oct 31, 2012 · 1 comment

2 participants

@maurice2k

Changing to a new page from a page that has been previously loaded using AJAX (external page) triggers a removal of this external page. This seems completely logical and you can also disable this behaviour using data-dom-cache="true".

However, when it comes to dialogs the removal of the previously loaded external page is probably not what you want (regardless of what data-dom-cache is set to) because it's most likely that closing the dialog should show the underlying page again.
Currently this triggers a reload which also means that all modifications to that page (checkboxes being checked, filled forms etc.) are gone.

Expected result: If the new page is a dialog the previous page should not be removed from DOM.

Online test page:
http://jsbin.com/alijiy/5

There's also a post on stackoverflow addressing this problem:
http://stackoverflow.com/questions/9364424/why-is-jquerymobile-reloading-the-page-on-dialog-close

@maurice2k maurice2k added a commit to maurice2k/jquery-mobile that referenced this issue Nov 6, 2012
@maurice2k maurice2k Dialog: adjusted pagehide handler to not remove pages when dialogs op…
…en. Fixed #5239 - dialog: External page being reloaded when dialog closes
5b4c8b1
@arschmitz
jQuery Foundation member

@maurice2k this is currently this is the expected behavior since dialogs are just a way of displaying a page im going to mark this as a feature request add to the wiki and close. we will reopen if we decide to implement this.

@arschmitz arschmitz closed this Dec 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment