diff --git a/js/transitions/transition.js b/js/transitions/transition.js index 748d3bd6a1d..6be536ba575 100644 --- a/js/transitions/transition.js +++ b/js/transitions/transition.js @@ -63,9 +63,9 @@ define( [ "jquery", this.deferred.resolve( this.name, this.reverse, this.$to, this.$from, true ); }, - doneOut: function( screenHeight, reverseClass, none ) { + doneOut: function( screenHeight, reverseClass, none, preventFocus ) { this.beforeDoneOut(); - this.startIn( screenHeight, reverseClass, none ); + this.startIn( screenHeight, reverseClass, none, preventFocus ); }, hideIn: function( callback ) { @@ -90,12 +90,14 @@ define( [ "jquery", }, 150 ); }, - startIn: function( screenHeight, reverseClass, none ) { + startIn: function( screenHeight, reverseClass, none, preventFocus ) { this.hideIn(function() { this.$to.addClass( $.mobile.activePageClass + this.toPreClass ); // Send focus to page as it is now display: block - $.mobile.focusPage( this.$to ); + if( !preventFocus ){ + $.mobile.focusPage( this.$to ); + } // Set to page height this.$to.height( screenHeight + this.toScroll ); @@ -153,7 +155,7 @@ define( [ "jquery", if ( this.$from && !none ) { this.startOut( screenHeight, reverseClass, none ); } else { - this.doneOut( screenHeight, reverseClass, none ); + this.doneOut( screenHeight, reverseClass, none, true ); } return this.deferred.promise();