Skip to content

Commit 606bfe5

Browse files
author
scottjehl
committed
removed all internal usage of the touch overflow support test and enabled flag. Still leaving both defined, however.
1 parent 372b61f commit 606bfe5

File tree

5 files changed

+12
-88
lines changed

5 files changed

+12
-88
lines changed

css/structure/jquery.mobile.core.css

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,6 @@ div.ui-mobile-viewport { overflow-x: hidden; }
2424
.ui-mobile, .ui-mobile .ui-page { min-height: 300px; }
2525
}
2626

27-
/* native overflow scrolling */
28-
.ui-page.ui-mobile-touch-overflow,
29-
.ui-page.ui-mobile-touch-overflow.ui-page-header-fixed .ui-content,
30-
.ui-page.ui-mobile-touch-overflow.ui-page-footer-fixed .ui-content {
31-
overflow: auto;
32-
height: 100%;
33-
left: 0;
34-
right: 0;
35-
-webkit-overflow-scrolling: touch;
36-
-moz-overflow-scrolling: touch;
37-
-o-overflow-scrolling: touch;
38-
-ms-overflow-scrolling: touch;
39-
overflow-scrolling: touch;
40-
}
41-
.ui-page.ui-mobile-touch-overflow.ui-page-header-fixed {
42-
overflow: visible;
43-
}
44-
.ui-page.ui-mobile-touch-overflow,
45-
.ui-page.ui-mobile-touch-overflow * {
46-
/* some level of transform keeps elements from blinking out of visibility on iOS */
47-
-webkit-transform: rotateY(0);
48-
}
49-
.ui-page.ui-mobile-pre-transition {
50-
display: block;
51-
}
52-
5327
/* loading screen */
5428
.ui-loading .ui-loader { display: block; }
5529
.ui-loader { background-color: #000; opacity: .18; display: none; z-index: 9999999; position: fixed; width: 46px; height: 46px; top: 50%; box-shadow: 0 1px 1px -1px #fff; margin-left: -18px; margin-top: -18px; left: 50%; padding: 1px; border:0; -webkit-border-radius: 36px; -moz-border-radius: 36px; border-radius: 36px; }

js/jquery.mobile.forms.select.custom.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ define( [
311311
menuHeight = self.list.parent().outerHeight(),
312312
menuWidth = self.list.parent().outerWidth(),
313313
activePage = $( ".ui-page-active" ),
314-
tOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
315-
tScrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage,
316-
scrollTop = tOverflow ? tScrollElem.scrollTop() : $( window ).scrollTop(),
314+
tScrollElem = activePage,
315+
scrollTop = ( window ).scrollTop(),
317316
btnOffset = self.button.offset().top,
318317
screenHeight = $(window).height(),
319318
screenWidth = $(window).width();

js/jquery.mobile.init.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,6 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.navigation", "jquery.mo
126126
}
127127
});
128128

129-
// This function injects a meta viewport tag to prevent scaling. Off by default, on by default when touchOverflow scrolling is enabled
130-
function disableZoom() {
131-
var cont = "user-scalable=no",
132-
meta = $( "meta[name='viewport']" );
133-
134-
if( meta.length ){
135-
meta.attr( "content", meta.attr( "content" ) + ", " + cont );
136-
}
137-
else{
138-
$( "head" ).prepend( "<meta>", { "name": "viewport", "content": cont } );
139-
}
140-
}
141-
142-
// if touch-overflow is enabled, disable user scaling, as it creates usability issues
143-
if( $.support.touchOverflow && $.mobile.touchOverflowEnabled && !$.mobile.touchOverflowZoomEnabled ){
144-
disableZoom();
145-
}
146-
147129
// initialize events now, after mobileinit has occurred
148130
$.mobile._registerInternalEvents();
149131

js/jquery.mobile.navigation.js

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -406,21 +406,9 @@ define( [
406406

407407
// Save the last scroll distance per page, before it is hidden
408408
var setLastScrollEnabled = true,
409-
firstScrollElem, getScrollElem, setLastScroll, delayedSetLastScroll;
409+
setLastScroll, delayedSetLastScroll;
410410

411-
getScrollElem = function() {
412-
var scrollElem = $window, activePage,
413-
touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled;
414-
415-
if( touchOverflow ){
416-
activePage = $( ".ui-page-active" );
417-
scrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
418-
}
419-
420-
return scrollElem;
421-
};
422-
423-
setLastScroll = function( scrollElem ) {
411+
setLastScroll = function() {
424412
// this barrier prevents setting the scroll value based on the browser
425413
// scrolling the window based on a hashchange
426414
if( !setLastScrollEnabled ) {
@@ -430,7 +418,7 @@ define( [
430418
var active = $.mobile.urlHistory.getActive();
431419

432420
if( active ) {
433-
var lastScroll = scrollElem && scrollElem.scrollTop();
421+
var lastScroll = $window.scrollTop();
434422

435423
// Set active page's lastScroll prop.
436424
// If the location we're scrolling to is less than minScrollBack, let it go.
@@ -443,7 +431,7 @@ define( [
443431
// to the hash targets location (sometimes the top of the page). once pagechange fires
444432
// getLastScroll is again permitted to operate
445433
delayedSetLastScroll = function() {
446-
setTimeout( setLastScroll, 100, $(this) );
434+
setTimeout( setLastScroll, 100 );
447435
};
448436

449437
// disable an scroll setting when a hashchange has been fired, this only works
@@ -462,23 +450,22 @@ define( [
462450
$window.one( "pagecontainercreate", function(){
463451
// once the page has changed, re-enable the scroll recording
464452
$.mobile.pageContainer.bind( "pagechange", function() {
465-
var scrollElem = getScrollElem();
466453

467454
setLastScrollEnabled = true;
468455

469456
// remove any binding that previously existed on the get scroll
470457
// which may or may not be different than the scroll element determined for
471458
// this page previously
472-
scrollElem.unbind( "scrollstop", delayedSetLastScroll );
459+
$window.unbind( "scrollstop", delayedSetLastScroll );
473460

474461
// determine and bind to the current scoll element which may be the window
475462
// or in the case of touch overflow the element with touch overflow
476-
scrollElem.bind( "scrollstop", delayedSetLastScroll );
463+
$window.bind( "scrollstop", delayedSetLastScroll );
477464
});
478465
});
479466

480467
// bind to scrollstop for the first page as "pagechange" won't be fired in that case
481-
getScrollElem().bind( "scrollstop", delayedSetLastScroll );
468+
$window.bind( "scrollstop", delayedSetLastScroll );
482469

483470
//function for transitioning between two existing pages
484471
function transitionPages( toPage, fromPage, transition, reverse ) {
@@ -529,10 +516,6 @@ define( [
529516

530517
//simply set the active page's minimum height to screen height, depending on orientation
531518
function resetActivePageHeight(){
532-
// Don't apply this height in touch overflow enabled mode
533-
if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){
534-
return;
535-
}
536519
$( "." + $.mobile.activePageClass ).css( "min-height", getScreenHeight() );
537520
}
538521

js/jquery.mobile.transition.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ function outInTransitionHandler( name, reverse, $to, $from ) {
1717
var deferred = new $.Deferred(),
1818
reverseClass = reverse ? " reverse" : "",
1919
active = $.mobile.urlHistory.getActive(),
20-
touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
21-
toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
20+
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
2221
screenHeight = $.mobile.getScreenHeight(),
2322
viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
2423
maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
@@ -40,23 +39,10 @@ function outInTransitionHandler( name, reverse, $to, $from ) {
4039
// Send focus to page as it is now display: block
4140
$.mobile.focusPage( $to );
4241

43-
if( touchOverflow && toScroll ){
44-
45-
//set page's scrollTop to remembered distance
46-
if( $to.is( ".ui-native-fixed" ) ){
47-
$to.find( ".ui-content" ).scrollTop( toScroll );
48-
}
49-
else{
50-
$to.scrollTop( toScroll );
51-
}
52-
}
53-
5442
// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
55-
if( !touchOverflow ){
56-
$to.height( screenHeight + toScroll );
43+
$to.height( screenHeight + toScroll );
5744

58-
$.mobile.silentScroll( toScroll );
59-
}
45+
$.mobile.silentScroll( toScroll );
6046

6147
$to.addClass( name + " in" + reverseClass );
6248

0 commit comments

Comments
 (0)