Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix for issue 1826 - Nightly build - dialog box no longer rounded cor…
Browse files Browse the repository at this point in the history
…ners

- Don't set a default value for the 'role' option to loadPage() and changePage(). Instead, rely on the role attribute that is on the element.

- Fixed an error that was happening when a hash change involves going from a dialog back to another dialog. I had recently made changes that assumed the 'to' variable was always going to be a url string, but it turns out in the dialog back to dialog case, it is an actual jQuery collection.
  • Loading branch information
jblas committed Jun 16, 2011
1 parent d2f1153 commit 8b6d14b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@
type: "get",
data: undefined,
reloadPage: false,
role: "page",
role: undefined, // By default we rely on the role defined by the @data-role attribute.
showLoadMsg: true,
pageContainer: undefined
};
Expand Down Expand Up @@ -780,7 +780,7 @@
//
// XXX_jblas: We need to remove this at some point when we allow for transitions
// to the same page.
if( active && active.page[0] === toPage[0] ) {
if( fromPage && fromPage[0] === toPage[0] ) {
isPageTransitioning = false;
mpc.trigger( "changepage" );
return;
Expand Down Expand Up @@ -870,7 +870,7 @@
reverse: false,
changeHash: true,
fromHashChange: false,
role: "page",
role: undefined, // By default we rely on the role defined by the @data-role attribute.
duplicateCachedPage: undefined,
pageContainer: undefined
};
Expand Down Expand Up @@ -1022,7 +1022,7 @@
$link.jqmData( "back" ),

//this may need to be more specific as we use data-rel more
role = $link.attr( "data-" + $.mobile.ns + "rel" ) || "page";
role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined;

$.mobile.changePage( href, { transition: transition, reverse: reverse, role: role } );
event.preventDefault();
Expand Down Expand Up @@ -1068,7 +1068,8 @@

//if to is defined, load it
if ( to ) {
$.mobile.changePage( ( path.isPath(to) ? "" : "#" ) + to, { transition: transition, changeHash: false, fromHashChange: true } );
to = ( typeof to === "string" && !path.isPath( to ) ) ? ( '#' + to ) : to;
$.mobile.changePage( to, { transition: transition, changeHash: false, fromHashChange: true } );
}
//there's no hash, go to the first page in the dom
else {
Expand Down

0 comments on commit 8b6d14b

Please sign in to comment.