Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4285 from uGoMobi/issue_4185

Fixes #4185 - When leaving from a page contains nested listview, pageremove event does not fire
  • Loading branch information...
commit 7aa65ac931c5d91e9f3727183526e619212f630a 1 parent fe55447
Scott Jehl authored jaspermdegroot committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 js/jquery.mobile.listview.js
View
8 js/jquery.mobile.listview.js
@@ -378,13 +378,17 @@ $.widget( "mobile.listview", $.mobile.widget, {
parentPage.data("page").options.domCache === false ) {
var newRemove = function( e, ui ){
- var nextPage = ui.nextPage, npURL;
+ var nextPage = ui.nextPage, npURL,
+ prEvent = new $.Event( "pageremove" );
if( ui.nextPage ){
npURL = nextPage.jqmData( "url" );
if( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ){
self.childPages().remove();
- parentPage.remove();
+ parentPage.trigger( prEvent );
+ if( !prEvent.isDefaultPrevented() ){
+ parentPage.removeWithDependents();
+ }
}
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.