Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions js/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
9 changes: 2 additions & 7 deletions js/widgets/pagecontainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},

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

_getMinScroll: function() {
return $.mobile.minScrollBack;
},

_getDefaultScroll: function() {
return $.mobile.defaultHomeScroll;
},
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/content/content_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down