Skip to content

Commit f779416

Browse files
author
scottjehl
committed
moved touchOverflowEnabled setting to global config, class is applied through page plugin. False by default. No longer dependent on fixed headers and footers.
1 parent a00c051 commit f779416

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

js/jquery.mobile.core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
// Minimum scroll distance that will be remembered when returning to a page
3939
minScrollBack: 250,
40+
41+
// Enable touch-overflow scrolling for better transitions, in supporting browsers
42+
touchOverflowEnabled: false,
4043

4144
// Set default dialog transition - 'none' for no transitions
4245
defaultDialogTransition: "pop",

js/jquery.mobile.page.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ $.widget( "mobile.page", $.mobile.widget, {
1818
this.element
1919
.attr( "tabindex", "0" )
2020
.addClass( "ui-page ui-body-" + this.options.theme );
21+
22+
// if touchOverflow scrolling is enabled, add class
23+
if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){
24+
this.element.addClass( "ui-mobile-touch-overflow" );
25+
}
2126
},
2227

2328
keepNativeSelector: function() {

0 commit comments

Comments
 (0)