diff --git a/docs/pages/docs-pages.html b/docs/pages/docs-pages.html index e23b5191..c05807fe 100755 --- a/docs/pages/docs-pages.html +++ b/docs/pages/docs-pages.html @@ -33,9 +33,9 @@ <html> <head> <title>Page Title</title> - <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" /> + <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> - <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script> + <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> </head> <body> @@ -75,9 +75,9 @@ <html> <head> <title>Page Title</title> - <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" /> + <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> - <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script> + <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> </head> <body> diff --git a/external/qunit.css b/external/qunit.css index 16cf7f09..2d4bd9d8 100644 --- a/external/qunit.css +++ b/external/qunit.css @@ -11,11 +11,10 @@ /** Resets */ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { - margin: 0; + margin: 0 8px; padding: 0; } - /** Header */ #qunit-header { @@ -32,6 +31,8 @@ -moz-border-radius: 15px 15px 0 0; -webkit-border-top-right-radius: 15px; -webkit-border-top-left-radius: 15px; + + margin-top: 8px; } #qunit-header a { @@ -64,6 +65,7 @@ #qunit-tests { list-style-position: inside; + margin-bottom: 8px; } #qunit-tests li { @@ -195,13 +197,7 @@ left: -10000px; } -[ data-nstest-role='page'], [ data-nstest-role='dialog'] { +[data-nstest-role='page'], [data-nstest-role='dialog'] { position: absolute !important; top: -10000px !important; } - -/* maintain styling */ -.ui-mobile-viewport { - margin: 8px; -} - diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 29e2e1b2..2cf58ff8 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -237,12 +237,20 @@ //direct focus to the page title, or otherwise first focusable element function reFocus( page ){ - var pageTitle = page.find( ".ui-title:eq(0)" ); - if( pageTitle.length ){ - pageTitle.focus(); + var lastClicked = page.jqmData( "lastClicked" ); + + if( lastClicked && lastClicked.length ){ + lastClicked.focus(); } - else{ - page.find( focusable ).eq(0).focus(); + else { + var pageTitle = page.find( ".ui-title:eq(0)" ); + + if( pageTitle.length ){ + pageTitle.focus(); + } + else{ + page.find( focusable ).eq(0).focus(); + } } } @@ -396,7 +404,9 @@ if( from ){ //set as data for returning to that spot - from.jqmData( "lastScroll", currScroll); + from + .jqmData( "lastScroll", currScroll) + .jqmData( "lastClicked", $activeClickedLink); //trigger before show/hide events from.data( "page" )._trigger( "beforehide", null, { nextPage: to } ); } diff --git a/js/jquery.mobile.vmouse.js b/js/jquery.mobile.vmouse.js index f48bd794..793f98b5 100644 --- a/js/jquery.mobile.vmouse.js +++ b/js/jquery.mobile.vmouse.js @@ -30,12 +30,9 @@ var dataPropertyName = "virtualMouseBindings", resetTimerID = 0, startX = 0, startY = 0, - startScrollX = 0, - startScrollY = 0, didScroll = false, clickBlockList = [], blockMouseTriggers = false, - scrollTopSupported = $.support.scrollTop, eventCaptureSupported = $.support.eventCapture, $document = $(document), nextTouchID = 1, @@ -227,11 +224,6 @@ function handleTouchStart(event) startX = t.pageX; startY = t.pageY; - if (scrollTopSupported){ - startScrollX = window.pageXOffset; - startScrollY = window.pageYOffset; - } - triggerVirtualEvent("vmouseover", event, flags); triggerVirtualEvent("vmousedown", event, flags); } @@ -255,7 +247,6 @@ function handleTouchMove(event) var didCancel = didScroll, moveThreshold = $.vmouse.moveDistanceThreshold; didScroll = didScroll - || (scrollTopSupported && (startScrollX !== window.pageXOffset || startScrollY !== window.pageYOffset)) || (Math.abs(t.pageX - startX) > moveThreshold || Math.abs(t.pageY - startY) > moveThreshold); var flags = getVirtualBindingFlags(event.target); diff --git a/version.txt b/version.txt index a17355a9..26e1dae0 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0beta-pre \ No newline at end of file +1.0a4.1 \ No newline at end of file