Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a class while the TO page is being set up for show (block display…

…, focus, scrolling, setting height) called ui-page-pre-in. This class sets the opacity of the TO page to 0 during this momentary process, which at least in my testing, prevents fixed toolbars and pages from flickering during transitions when fixed toolbars are used in a web app mode in iOS (not Safari, but native webview). Fade transition is particularly improved. Addresses, but perhaps doesn't completely fix Issue #4024
commit f164821cd7fa64ea582728f524a927a621402507 1 parent 393f88c
scottjehl authored jaspermdegroot committed
View
3  css/structure/jquery.mobile.fixedToolbar.css
@@ -7,6 +7,9 @@
position: fixed;
z-index: 1000;
}
+.ui-page-pre-in {
+ opacity: 0;
+}
.ui-header-fixed {
top: 0;
}
View
7 js/jquery.mobile.transition.js
@@ -26,6 +26,7 @@ var createHandler = function( sequential ){
screenHeight = $.mobile.getScreenHeight(),
maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
+ toPreClass = " ui-page-pre-in",
toggleViewportClass = function(){
$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
},
@@ -73,7 +74,7 @@ var createHandler = function( sequential ){
startIn = function(){
- $to.addClass( $.mobile.activePageClass );
+ $to.addClass( $.mobile.activePageClass + toPreClass );
// Send focus to page as it is now display: block
$.mobile.focusPage( $to );
@@ -87,7 +88,9 @@ var createHandler = function( sequential ){
$to.animationComplete( doneIn );
}
- $to.addClass( name + " in" + reverseClass );
+ $to
+ .removeClass( toPreClass )
+ .addClass( name + " in" + reverseClass );
if( none ){
doneIn();

1 comment on commit f164821

@muisish

Hi Scottjehl,
I'm newbe in phonegap and jquery mobile. so can you give me detail instruction to use it ? ^_^

Please sign in to comment.
Something went wrong with that request. Please try again.