From d99d096ab70cb1a0aaa30edd00186286f34733f9 Mon Sep 17 00:00:00 2001 From: frietsch Date: Thu, 9 Jun 2011 08:21:21 -0700 Subject: [PATCH] Bugfix: ":jqmData(ajax='false')" might also match forms, which have neither of "src" or "href". In that case, thisUrl is undefined, and the following replace results in an error. --- js/jquery.mobile.navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 6a4e2439..93c18a6a 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -495,7 +495,8 @@ if( !$.support.dynamicBaseTag ) { var newPath = path.get( fileUrl ); page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() { - var thisAttr = $( this ).is( '[href]' ) ? 'href' : 'src', + var thisAttr = $( this ).is( '[href]' ) ? 'href' : + $(this).is('[src]') ? 'src' : 'action', thisUrl = $( this ).attr( thisAttr ); // XXX_jblas: We need to fix this so that it removes the document