Skip to content

Commit 699e1a4

Browse files
author
scottjehl
committed
undid changes introduced to address issue jquery-archive#3505.
1 parent 180ff5d commit 699e1a4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

js/jquery.mobile.navigation.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ define( [
10771077
settings.reverse = settings.reverse || historyDir < 0;
10781078

10791079
transitionPages( toPage, fromPage, settings.transition, settings.reverse )
1080-
.done(function( name, reverse, $to, $from ) {
1080+
.done(function( name, reverse, $to, $from, alreadyFocused ) {
10811081
removeActiveLinkClass();
10821082

10831083
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
@@ -1092,7 +1092,9 @@ define( [
10921092
// itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility)
10931093
// despite visibility: hidden addresses issue #2965
10941094
// https://github.com/jquery/jquery-mobile/issues/2965
1095-
$.mobile.focusPage( toPage );
1095+
if( !alreadyFocused ){
1096+
$.mobile.focusPage( toPage );
1097+
}
10961098

10971099
releasePageTransitionLock();
10981100

js/jquery.mobile.transition.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ function outInTransitionHandler( name, reverse, $to, $from ) {
3535
if( !none ){
3636
$to.animationComplete( doneIn );
3737
}
38+
39+
// Send focus to page as it is now display: block
40+
$.mobile.focusPage( $to );
3841

3942
// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
4043
$to.height( screenHeight + toScroll );
@@ -55,7 +58,7 @@ function outInTransitionHandler( name, reverse, $to, $from ) {
5558
.height( "" )
5659
.parent().removeClass( viewportClass );
5760

58-
deferred.resolve( name, reverse, $to, $from );
61+
deferred.resolve( name, reverse, $to, $from, true );
5962
};
6063

6164
$to

0 commit comments

Comments
 (0)