Permalink
Browse files

changed minscroll to 250, better organization of lastscroll

  • Loading branch information...
scottjehl
scottjehl committed Aug 26, 2011
1 parent ac67e92 commit 003505a4b9d64a37997710efebe06b5d8823b5de
Showing with 12 additions and 6 deletions.
  1. +1 −1 js/jquery.mobile.core.js
  2. +11 −5 js/jquery.mobile.navigation.js
View
@@ -36,7 +36,7 @@
defaultPageTransition: "slide",
// Minimum scroll distance that will be remembered when returning to a page
minScrollBack: screen.height / 2,
minScrollBack: 250,
// Set default dialog transition - 'none' for no transitions
defaultDialogTransition: "pop",
@@ -385,6 +385,15 @@
$.mobile.changePage.apply( null, pageTransitionQueue.pop() );
}
}
// Save last scroll distance
$( document ).bind( "beforechangepage", function(){
var active = $.mobile.urlHistory.getActive();
if( active ){
active.lastScroll = $( window ).scrollTop();
}
});
//function for transitioning between two existing pages
function transitionPages( toPage, fromPage, transition, reverse ) {
@@ -452,6 +461,8 @@
return pageMin;
}
$.mobile.getScreenHeight = getScreenHeight;
//simply set the active page's minimum height to screen height, depending on orientation
function resetActivePageHeight(){
@@ -893,11 +904,6 @@
isForward: function() { historyDir = 1; }
});
}
// Set active item's lastScroll prop
if( active ){
active.lastScroll = $( window ).scrollTop();
}
// Kill the keyboard.
// XXX_jblas: We need to stop crawling the entire document to kill focus. Instead,

0 comments on commit 003505a

Please sign in to comment.