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

Commit

Permalink
[popup] Do not use history when there is no AJAX -- Fixes #5006
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Sep 15, 2012
1 parent b0e6839 commit 4ed1fc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/widgets/popup.js
Expand Up @@ -56,6 +56,8 @@ define( [ "jquery",
// NOTE Windows Phone 7 has a scroll position caching issue that
// requires us to disable popup history management by default
// https://github.com/jquery/jquery-mobile/issues/4784
//
// NOTE this option is modified in _create!
history: !$.mobile.browser.ie
},

Expand Down Expand Up @@ -148,6 +150,11 @@ define( [ "jquery",
myId = this.element.attr( "id" ),
self = this;

// We need to adjust the history option to be false if there's no AJAX nav.
// We can't do it in the option declarations because those are run before
// it is determined whether there shall be AJAX nav.
this.options.history = this.options.history && $.mobile.ajaxEnabled;

if ( thisPage.length === 0 ) {
thisPage = $( "body" );
}
Expand Down

0 comments on commit 4ed1fc7

Please sign in to comment.