mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-17 12:51:00 +00:00
added an forceRemoval argument to make sure active states are removed when a page load error occurs. Fixes #364
This commit is contained in:
parent
f8a0812c20
commit
4036aa97e9
1 changed files with 3 additions and 3 deletions
|
|
@ -215,8 +215,8 @@
|
|||
}
|
||||
|
||||
//remove active classes after page transition or error
|
||||
function removeActiveLinkClass(){
|
||||
if(activeClickedLink && !activeClickedLink.closest( '.ui-page-active' ).length ){
|
||||
function removeActiveLinkClass(forceRemoval){
|
||||
if(activeClickedLink && (!activeClickedLink.closest( '.ui-page-active' ).length) || forceRemoval ){
|
||||
activeClickedLink.removeClass( activeBtnClass );
|
||||
}
|
||||
activeClickedLink = null;
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
},
|
||||
error: function() {
|
||||
pageLoading( true );
|
||||
removeActiveLinkClass();
|
||||
removeActiveLinkClass(true);
|
||||
jQuery("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>")
|
||||
.css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
|
||||
.appendTo( $pageContainer )
|
||||
|
|
|
|||
Loading…
Reference in a new issue