From 8da09694f91ff1cc027a5d9e1a52a4cca1a658f1 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Fri, 3 Jul 2015 01:37:29 -0400 Subject: [PATCH] Defaults: Remove minScrollBack there should not be a min height Fixes gh-6302 --- js/defaults.js | 4 ---- js/widgets/pagecontainer.js | 9 ++------- tests/unit/content/content_core.js | 7 +------ 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/js/defaults.js b/js/defaults.js index 111cf25bd1f..a90e1e47b90 100644 --- a/js/defaults.js +++ b/js/defaults.js @@ -67,10 +67,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", diff --git a/js/widgets/pagecontainer.js b/js/widgets/pagecontainer.js index d31fec5492c..90d75ce58ec 100644 --- a/js/widgets/pagecontainer.js +++ b/js/widgets/pagecontainer.js @@ -120,16 +120,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; } }, @@ -141,10 +140,6 @@ $.widget( "mobile.pagecontainer", { return this.window.scrollTop(); }, - _getMinScroll: function() { - return $.mobile.minScrollBack; - }, - _getDefaultScroll: function() { return $.mobile.defaultHomeScroll; }, diff --git a/tests/unit/content/content_core.js b/tests/unit/content/content_core.js index 5f72ccc06c9..7be718879af 100644 --- a/tests/unit/content/content_core.js +++ b/tests/unit/content/content_core.js @@ -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