mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-23 07:34:43 +00:00
changed minscroll to 250, better organization of lastscroll
This commit is contained in:
parent
ac67e92cbb
commit
003505a4b9
2 changed files with 12 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue