Permalink
Browse files

Revert "By caching the href value to data and switching the href to a…

… #, we can avoid address bar showing in iOS on every click. The click handler resets the href during its initial steps if this data is present. Note that the address bar will still likely drop down when you click the browser's back button. The only time the back button will not drop the address bar appears to be when the back button does not trigger a pushstate operation - so pushstate would either have to be disabled, or the page would have to be local (multipage), or the page would need to be a dialog (since then going back would only be a hashchange)."

This reverts commit 4f12d46.

As discussed during the last weekly meeting and on IRC, this change is causing too much side effects. Fixes #3777

Conflicts:

	js/jquery.mobile.navigation.js
  • Loading branch information...
1 parent ed96cb4 commit bdc5d50cd1211fcc8c3b8198e6bc441aa475be34 @gseguin gseguin committed May 9, 2012
Showing with 0 additions and 10 deletions.
  1. +0 −10 js/jquery.mobile.navigation.js
@@ -1261,11 +1261,6 @@ define( [
$activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
$activeClickedLink.addClass( $.mobile.activeBtnClass );
$( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
-
- // By caching the href value to data and switching the href to a #, we can avoid address bar showing in iOS. The click handler resets the href during its initial steps if this data is present
- $( link )
- .jqmData( "href", $( link ).attr( "href" ) )
- .attr( "href", "#" );
}
}
});
@@ -1291,11 +1286,6 @@ define( [
window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 );
};
- // If there's data cached for the real href value, set the link's href back to it again. This pairs with an address bar workaround from the vclick handler
- if( $link.jqmData( "href" ) ){
- $link.attr( "href", $link.jqmData( "href" ) );
- }
-
//if there's a data-rel=back attr, go back in history
if( $link.is( ":jqmData(rel='back')" ) ) {
window.history.back();

0 comments on commit bdc5d50

Please sign in to comment.