Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 4ed1fc759d2a2a024ec918711d8280ac55b0e921 1 parent b0e6839
Gabriel "_|Nix|_" Schulhof authored September 15, 2012

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  js/widgets/popup.js
7  js/widgets/popup.js
@@ -56,6 +56,8 @@ define( [ "jquery",
56 56
 			// NOTE Windows Phone 7 has a scroll position caching issue that
57 57
 			//      requires us to disable popup history management by default
58 58
 			//      https://github.com/jquery/jquery-mobile/issues/4784
  59
+			//
  60
+			// NOTE this option is modified in _create!
59 61
 			history: !$.mobile.browser.ie
60 62
 		},
61 63
 
@@ -148,6 +150,11 @@ define( [ "jquery",
148 150
 				myId = this.element.attr( "id" ),
149 151
 				self = this;
150 152
 
  153
+			// We need to adjust the history option to be false if there's no AJAX nav.
  154
+			// We can't do it in the option declarations because those are run before
  155
+			// it is determined whether there shall be AJAX nav.
  156
+			this.options.history = this.options.history && $.mobile.ajaxEnabled; 
  157
+
151 158
 			if ( thisPage.length === 0 ) {
152 159
 				thisPage = $( "body" );
153 160
 			}

0 notes on commit 4ed1fc7

Please sign in to comment.
Something went wrong with that request. Please try again.