Permalink
Browse files

Defaults: Remove minScrollBack there should not be a min height

Fixes gh-6302
Closes gh-8182
  • Loading branch information...
arschmitz committed Jul 3, 2015
1 parent fee3bab commit 1b2746f3577dc66e12e8e1f9ee5ab2ef26bdc9c3
Showing with 3 additions and 17 deletions.
  1. +0 −4 js/defaults.js
  2. +2 −7 js/widgets/pagecontainer.js
  3. +1 −6 tests/unit/content/content_core.js
View
@@ -49,10 +49,6 @@ return $.extend( $.mobile, {
// Set maximum window width for transitions to apply - 'false' for no limit
maxTransitionWidth: false,
// Minimum scroll distance that will be remembered when returning to a page
// Deprecated remove in 1.5
minScrollBack: 0,
// Set default dialog transition - 'none' for no transitions
defaultDialogTransition: "pop",
@@ -125,16 +125,15 @@ $.widget( "mobile.pagecontainer", {
}
var active = this._getActiveHistory(),
currentScroll, minScroll, defaultScroll;
currentScroll, defaultScroll;
if ( active ) {
currentScroll = this._getScroll();
minScroll = this._getMinScroll();
defaultScroll = this._getDefaultScroll();
// Set active page's lastScroll prop. If the location we're
// scrolling to is less than minScrollBack, let it go.
active.lastScroll = currentScroll < minScroll ? defaultScroll : currentScroll;
active.lastScroll = currentScroll < defaultScroll ? defaultScroll : currentScroll;
}
},
@@ -146,10 +145,6 @@ $.widget( "mobile.pagecontainer", {
return this.window.scrollTop();
},
_getMinScroll: function() {
return $.mobile.minScrollBack;
},
_getDefaultScroll: function() {
return $.mobile.defaultHomeScroll;
},
@@ -246,14 +246,9 @@ test( "prefers default scroll when current scroll < default scroll", function()
return active;
};
// min scroll
proto._getMinScroll = function() {
return 50;
};
// current scroll
proto._getScroll = function() {
return 25;
return 0;
};
// default scroll

0 comments on commit 1b2746f

Please sign in to comment.