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

Commit 1b2746f

Browse files
committed
Defaults: Remove minScrollBack there should not be a min height
Fixes gh-6302 Closes gh-8182
1 parent fee3bab commit 1b2746f

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

js/defaults.js

-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ return $.extend( $.mobile, {
4949
// Set maximum window width for transitions to apply - 'false' for no limit
5050
maxTransitionWidth: false,
5151

52-
// Minimum scroll distance that will be remembered when returning to a page
53-
// Deprecated remove in 1.5
54-
minScrollBack: 0,
55-
5652
// Set default dialog transition - 'none' for no transitions
5753
defaultDialogTransition: "pop",
5854

js/widgets/pagecontainer.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,15 @@ $.widget( "mobile.pagecontainer", {
125125
}
126126

127127
var active = this._getActiveHistory(),
128-
currentScroll, minScroll, defaultScroll;
128+
currentScroll, defaultScroll;
129129

130130
if ( active ) {
131131
currentScroll = this._getScroll();
132-
minScroll = this._getMinScroll();
133132
defaultScroll = this._getDefaultScroll();
134133

135134
// Set active page's lastScroll prop. If the location we're
136135
// scrolling to is less than minScrollBack, let it go.
137-
active.lastScroll = currentScroll < minScroll ? defaultScroll : currentScroll;
136+
active.lastScroll = currentScroll < defaultScroll ? defaultScroll : currentScroll;
138137
}
139138
},
140139

@@ -146,10 +145,6 @@ $.widget( "mobile.pagecontainer", {
146145
return this.window.scrollTop();
147146
},
148147

149-
_getMinScroll: function() {
150-
return $.mobile.minScrollBack;
151-
},
152-
153148
_getDefaultScroll: function() {
154149
return $.mobile.defaultHomeScroll;
155150
},

tests/unit/content/content_core.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,9 @@ test( "prefers default scroll when current scroll < default scroll", function()
246246
return active;
247247
};
248248

249-
// min scroll
250-
proto._getMinScroll = function() {
251-
return 50;
252-
};
253-
254249
// current scroll
255250
proto._getScroll = function() {
256-
return 25;
251+
return 0;
257252
};
258253

259254
// default scroll

0 commit comments

Comments
 (0)