Permalink
Browse files

[popup] Do not use history when there is no AJAX -- Fixes #5006

  • Loading branch information...
gabrielschulhof committed Sep 15, 2012
1 parent b0e6839 commit 4ed1fc759d2a2a024ec918711d8280ac55b0e921
Showing with 7 additions and 0 deletions.
  1. +7 −0 js/widgets/popup.js
View
@@ -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
},
@@ -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" );
}

0 comments on commit 4ed1fc7

Please sign in to comment.