diff --git a/js/jquery.mobile.listview.js b/js/jquery.mobile.listview.js index dbaa3ad1..ee94e12e 100644 --- a/js/jquery.mobile.listview.js +++ b/js/jquery.mobile.listview.js @@ -269,8 +269,12 @@ $.widget( "mobile.listview", $.mobile.widget, { }).listview(); - //on pagehide, remove any nested pages along with the parent page, as long as they aren't active - if( hasSubPages && parentPage.data("page").options.domCache === false ){ + // on pagehide, remove any nested pages along with the parent page, as long as they aren't active + // and aren't embedded + if( hasSubPages && + parentPage.is( "jqmData(external-page='true')" ) && + parentPage.data("page").options.domCache === false ) { + var newRemove = function( e, ui ){ var nextPage = ui.nextPage, npURL; diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 138d4d31..482559d9 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -784,8 +784,12 @@ } //append to page and enhance + // TODO taging a page with external to make sure that embedded pages aren't removed + // by the various page handling code is bad. Having page handling code in many + // places is bad. Solutions post 1.0 page .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) ) + .attr( "data-" + $.mobile.ns + "external-page", true ) .appendTo( settings.pageContainer ); // wait for page creation to leverage options defined on widget