From 4882c068b09a0394522882e19a8e9a532c1de487 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Wed, 8 Dec 2010 12:40:21 -0800 Subject: [PATCH] Modified loadComplete() so that it always fires off the "show" event. The idea here is that calling preventDefault() on a "hide" event shouldn't prevent the "show" event from being dispatched. Calling preventDefault() on the "show" event still prevents the "to" page from becoming the active page. Removed redundant target delcaration in the live click callback. --- js/jquery.mobile.navigation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 75cd50e3..17d6a537 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -221,7 +221,8 @@ $.mobile.silentScroll( to.data( 'lastScroll' ) ); //trigger show/hide events, allow preventing focus change through return false - if( from.data("page")._trigger("hide", null, {nextPage: to}) !== false && to.data("page")._trigger("show", null, {prevPage: from}) !== false ){ + from.data("page")._trigger("hide", null, {nextPage: to}); + if( to.data("page")._trigger("show", null, {prevPage: from}) !== false ){ $.mobile.activePage = to; } }; @@ -389,8 +390,7 @@ //if target attr is specified, it's external, and we mimic _blank... for now target = $this.is( "[target]" ), //if it still starts with a protocol, it's external, or could be :mailto, etc - external = target || /^(:?\w+:)/.test( href ) || $this.is( "[rel=external]" ), - target = $this.is( "[target]" ); + external = target || /^(:?\w+:)/.test( href ) || $this.is( "[rel=external]" ); if( href === '#' ){ //for links created purely for interaction - ignore