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

Commit fbd38f3

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

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

js/defaults.js

Lines changed: 0 additions & 4 deletions
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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,15 @@ $.widget( "mobile.pagecontainer", {
120120
}
121121

122122
var active = this._getActiveHistory(),
123-
currentScroll, minScroll, defaultScroll;
123+
currentScroll, defaultScroll;
124124

125125
if ( active ) {
126126
currentScroll = this._getScroll();
127-
minScroll = this._getMinScroll();
128127
defaultScroll = this._getDefaultScroll();
129128

130129
// Set active page's lastScroll prop. If the location we're
131130
// scrolling to is less than minScrollBack, let it go.
132-
active.lastScroll = currentScroll < minScroll ? defaultScroll : currentScroll;
131+
active.lastScroll = currentScroll < defaultScroll ? defaultScroll : currentScroll;
133132
}
134133
},
135134

@@ -141,10 +140,6 @@ $.widget( "mobile.pagecontainer", {
141140
return this.window.scrollTop();
142141
},
143142

144-
_getMinScroll: function() {
145-
return $.mobile.minScrollBack;
146-
},
147-
148143
_getDefaultScroll: function() {
149144
return $.mobile.defaultHomeScroll;
150145
},

tests/unit/content/content_core.js

Lines changed: 1 addition & 6 deletions
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)