Skip to content

Commit

Permalink
Fix for issue 2451:
Browse files Browse the repository at this point in the history
ÎéÎíDialog not working if $.mobile.ajaxEnabled = falseÎéÎí
jquery-archive/jquery-mobile#2451

related/dup bug 2202:

ÎéÎíDialog loads in new page with ajaxEnabled = falseÎéÎí
jquery-archive/jquery-mobile#2202

- Modified the default click handler to check if the href is for an embedded page before bailing when ajaxEnabled = false. This allows us to navigate to internal/embedded pages/dialogs on the click versus waiting for the accidental hashchange that was the result of the browser's default handling of hash fragments.
  • Loading branch information
jblas committed Sep 19, 2011
1 parent 2d3cbbe commit 0fbea8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1215,18 +1215,18 @@
return false;
}

var baseUrl = getClosestBaseUrl( $link ),

//get href, if defined, otherwise default to empty hash
href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );

//if ajax is disabled, exit early
if( !$.mobile.ajaxEnabled ){
if( !$.mobile.ajaxEnabled && !path.isEmbeddedPage( href ) ){
httpCleanup();
//use default click handling
return;
}

var baseUrl = getClosestBaseUrl( $link ),

//get href, if defined, otherwise default to empty hash
href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );

// XXX_jblas: Ideally links to application pages should be specified as
// an url to the application document with a hash that is either
// the site relative path or id to the page. But some of the
Expand Down

0 comments on commit 0fbea8f

Please sign in to comment.