From b9557705b3183a444e9ec7640f163701b8a5be60 Mon Sep 17 00:00:00 2001 From: Michael Platov Date: Wed, 24 Aug 2011 14:28:12 +0800 Subject: [PATCH 01/80] Fix for issue 509 textarea autogrow --- js/jquery.mobile.forms.textinput.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index 1d8ab441..0a2b1e7e 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -109,6 +109,13 @@ $.widget( "mobile.textinput", $.mobile.widget, { clearTimeout( keyupTimeout ); keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer ); }); + // Issue 509: the browser is not giving scrollHeight properly until after this function has run, adding in a setTimeout + // so we can properly access the scrollHeight + if ($.trim(input.text())) { + setTimeout( function() { + keyup(); + }, 0 ); + } } }, From 47812171f10ee1b28dcc63615cb4a764fb49d2da Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Thu, 29 Sep 2011 15:16:21 -0700 Subject: [PATCH 02/80] Fixes #2570 - Refreshing a page with #&ui-state=dialog causes syntax error - This was a regression from my fix to loadPage() for detecting un-enhanced pages by @id as a fallback. In this particular case dataUrl was being used to create an id selector, and of course if the dataUrl is an empty string we end up using "#" as the selector. The fix is to simply check for a non-empty dataUrl. --- js/jquery.mobile.navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index a7a6ad81..f69450ae 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -737,7 +737,7 @@ // reference to an embedded page. If so, it may have been dynamically // injected by a developer, in which case it would be lacking a data-url // attribute and in need of enhancement. - if ( page.length === 0 && !path.isPath( dataUrl ) ) { + if ( page.length === 0 && dataUrl && !path.isPath( dataUrl ) ) { page = settings.pageContainer.children( "#" + dataUrl ) .attr( "data-" + $.mobile.ns + "url", dataUrl ) } From b4a7db2f1d59445010876a20873e6ba816e20a3c Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 29 Sep 2011 18:38:15 -0400 Subject: [PATCH 03/80] brought back these orientation rules as they're important in iOS5 layouts. --- js/jquery.mobile.fixHeaderFooter.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.fixHeaderFooter.native.js b/js/jquery.mobile.fixHeaderFooter.native.js index 7cc531fc..f9c1859a 100644 --- a/js/jquery.mobile.fixHeaderFooter.native.js +++ b/js/jquery.mobile.fixHeaderFooter.native.js @@ -8,7 +8,7 @@ (function( $, undefined ) { // Enable touch overflow scrolling when it's natively supported -$.mobile.touchOverflowEnabled = false; +$.mobile.touchOverflowEnabled = true; // Enabled zoom when touch overflow is enabled. Can cause usability issues, unfortunately $.mobile.touchOverflowZoomEnabled = false; From d5d3f4729476af40dcfbc99aef3610f9689581f3 Mon Sep 17 00:00:00 2001 From: gseguin Date: Thu, 29 Sep 2011 15:56:30 -0700 Subject: [PATCH 04/80] Added a link to jsbin and jsfiddle in the submitting bugs section --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d945a59..ef3b6bc4 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ A full, complete version and a minified, complete version of the jQuery Mobile J Submitting bugs =================================== -If you think you've found a bug, please visit the Issue tracker (https://github.com/jquery/jquery-mobile/issues) and create an issue explaining the problem and expected result. Be sure to include any relevant information for reproducing the issue, such as the browser/device (with version #), and the version of the jQuery Mobile code you're running. It also helps a lot to make sure that the bug still exists on jquerymobile.com/test/, as it's possible we may have fixed it already! It is also best to include code to reproduce the bug. +If you think you've found a bug, please visit the Issue tracker (https://github.com/jquery/jquery-mobile/issues) and create an issue explaining the problem and expected result. Be sure to include any relevant information for reproducing the issue, such as the browser/device (with version #), and the version of the jQuery Mobile code you're running. It also helps a lot to make sure that the bug still exists on http://jquerymobile.com/test/, as it's possible we may have fixed it already! + +It is also best to include code to reproduce the bug. To do that please use [jsbin](http://jsbin.com) or [jsfiddle](http://jsfiddle.net) and include a link to it in the ticket. Submitting patches From bafc18723b111a6ebef79f4abb738979a2055c66 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Fri, 30 Sep 2011 09:17:05 -0700 Subject: [PATCH 05/80] Fixes #2574 - namespace pollution on 'search' variable (1.0rc1) - There was a typo in the var declaration in makeUrlAbsolute(). Changed the ';' in the middle of the declaration to ','. --- js/jquery.mobile.navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index a7a6ad81..21e0482e 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -134,7 +134,7 @@ var relObj = path.parseUrl( relUrl ), absObj = path.parseUrl( absUrl ), protocol = relObj.protocol || absObj.protocol, - doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash ); + doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash ), authority = relObj.authority || absObj.authority, hasPath = relObj.pathname !== "", pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ), From 98eda9a0f469636c7e58d5c5d501314574d1ed08 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Fri, 30 Sep 2011 12:38:16 -0700 Subject: [PATCH 06/80] Fixes #2582 - Refreshing a page with #&ui-state=dialog causes page duplication - Modified loadPage() to call isFirstPage() with fileUrl instead of absUrl. Since fileUrl is the same as absUrl, but with the dialogHashKey stripped off, it will allow us to match against the url for the first-page. --- js/jquery.mobile.navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index f69450ae..4cd43dd6 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -744,7 +744,7 @@ // If we failed to find a page in the DOM, check the URL to see if it // refers to the first page in the application. - if ( page.length === 0 && $.mobile.firstPage && path.isFirstPageUrl( absUrl ) ) { + if ( page.length === 0 && $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) { page = $( $.mobile.firstPage ); } From 5811440641332a4fc2ad3b115ee670c9f7cc21e0 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Fri, 30 Sep 2011 12:40:57 -0700 Subject: [PATCH 07/80] Added a test for diretly loading Urls with a hash that contains just the dialogHashKey. This tests to make sure these issues don't happen again: Issue #2570 - Refreshing a page with #&ui-state=dialog causes syntax error Issue #2582 - Refreshing a page with #&ui-state=dialog causes page duplication --- tests/unit/navigation/index.html | 2 +- tests/unit/navigation/navigation_core.js | 29 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/unit/navigation/index.html b/tests/unit/navigation/index.html index 11fb0569..00be956f 100644 --- a/tests/unit/navigation/index.html +++ b/tests/unit/navigation/index.html @@ -32,7 +32,7 @@
-
+
diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index 2c2d3a7e..b22811bc 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -929,4 +929,33 @@ } ]); }); + + + asyncTest( "application url with dialogHashKey loads application's first page", function(){ + $.testHelper.pageSequence([ + // open our test page + function(){ + // Navigate to any page except the first page of the application. + $.testHelper.openPage("#foo"); + }, + + function(){ + ok( $.mobile.activePage[ 0 ] === $( "#foo" )[ 0 ], "navigated successfully to #foo" ); + + // Now navigate to an hash that contains just a dialogHashKey. + $.mobile.changePage("#" + $.mobile.dialogHashKey); + }, + + function(){ + // Make sure we actually navigated to the first page. + ok( $.mobile.activePage[ 0 ] === $.mobile.firstPage[ 0 ], "navigated successfully to first-page" ); + + // Now make sure opening the page didn't result in page duplication. + ok( $.mobile.firstPage.hasClass( "first-page" ), "first page has expected class" ); + same( $( ".first-page" ).length, 1, "first page was not duplicated" ); + + start(); + } + ]); + }); })(jQuery); From 7106078f87df5341acfab5fcb0d8d6be35958e82 Mon Sep 17 00:00:00 2001 From: gseguin Date: Mon, 3 Oct 2011 09:19:44 -0700 Subject: [PATCH 08/80] Fix for #2592 --- docs/pages/page-dynamic.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/page-dynamic.html b/docs/pages/page-dynamic.html index d1f39746..4dd23238 100644 --- a/docs/pages/page-dynamic.html +++ b/docs/pages/page-dynamic.html @@ -30,13 +30,13 @@
  • pagebeforechange
    • Fired off before any page loading or transition.
    • -
    • NOTE: This event was formally known as "beforechangepage".
    • +
    • NOTE: This event was formerly known as "beforechangepage".
  • pagechange
    • Fired off after all page loading and transitions.
    • -
    • NOTE: this event was formally known as "changepage".
    • +
    • NOTE: this event was formerly known as "changepage".
  • pagechangefailed From 1c5fd4c12feb2f36fd7e3f0babfac4d911adda32 Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 3 Oct 2011 14:25:13 -0400 Subject: [PATCH 09/80] Updated version to 1.0rc2pre --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index c20c851e..d8c69d9b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0rc1 \ No newline at end of file +1.0rc2pre \ No newline at end of file From ead0baf2abf76cd37fa25e55fccfceb724caf49c Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 3 Oct 2011 17:01:05 -0400 Subject: [PATCH 10/80] brought these orientation-based rules back for certain scenarios where they're helpful, such as when js is setting heights in iOS5. No bug fix, just a tweak. --- themes/default/jquery.mobile.core.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/default/jquery.mobile.core.css b/themes/default/jquery.mobile.core.css index fc2afbaf..527ab03b 100644 --- a/themes/default/jquery.mobile.core.css +++ b/themes/default/jquery.mobile.core.css @@ -19,6 +19,14 @@ /* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */ .ui-page { outline: none; } +/*orientations from js are available */ +@media screen and (orientation: portrait){ +.ui-mobile, .ui-mobile .ui-page { min-height: 420px; } +} +@media screen and (orientation: landscape){ +.ui-mobile, .ui-mobile .ui-page { min-height: 300px; } +} + /* native overflow scrolling */ .ui-page.ui-mobile-touch-overflow, .ui-mobile-touch-overflow.ui-native-fixed .ui-content { From 1791e671c94a3783c8562a51bbf2f6c140432b67 Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 3 Oct 2011 17:21:25 -0400 Subject: [PATCH 11/80] Removed global link styles, added in swatch-specific link styles for bar and body. --- themes/default/jquery.mobile.theme.css | 195 ++++++++++++++++++++----- 1 file changed, 157 insertions(+), 38 deletions(-) diff --git a/themes/default/jquery.mobile.theme.css b/themes/default/jquery.mobile.theme.css index 8a850b9a..5ffda5b5 100644 --- a/themes/default/jquery.mobile.theme.css +++ b/themes/default/jquery.mobile.theme.css @@ -30,12 +30,25 @@ font-family: Helvetica, Arial, sans-serif /*{a-bar-font}*/; } .ui-bar-a .ui-link-inherit { - color: #fff /*{a-bar-color}*/; + color: #fff /*{a-bar-color}*/; } + .ui-bar-a .ui-link { - color: #7cc4e7 /*{global-link-color}*/; + color: #7cc4e7 /*{a-bar-link-color}*/; font-weight: bold; } + +.ui-bar-a .ui-link:hover { + color: #2489CE /*{a-bar-link-hover}*/; +} + +.ui-bar-a .ui-link:active { + color: #2489CE /*{a-bar-link-active}*/; +} + +.ui-bar-a .ui-link:visited { + color: #2489CE /*{a-bar-link-visited}*/; +} .ui-body-a { border: 1px solid #2A2A2A /*{a-body-border}*/; background: #222222 /*{a-body-background-color}*/; @@ -57,12 +70,26 @@ font-family: Helvetica, Arial, sans-serif /*{a-body-font}*/; } .ui-body-a .ui-link-inherit { - color: #fff /*{a-body-color}*/; + color: #fff /*{a-body-color}*/; } + .ui-body-a .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{a-body-link-color}*/; font-weight: bold; } + +.ui-body-a .ui-link:hover { + color: #2489CE /*{a-body-link-hover}*/; +} + +.ui-body-a .ui-link:active { + color: #2489CE /*{a-body-link-active}*/; +} + +.ui-body-a .ui-link:visited { + color: #2489CE /*{a-body-link-visited}*/; +} + .ui-br { border-bottom: rgb(130,130,130); border-bottom: rgba(130,130,130,.3); @@ -149,13 +176,24 @@ font-family: Helvetica, Arial, sans-serif /*{b-bar-font}*/; } .ui-bar-b .ui-link-inherit { - color: #fff /*{b-bar-color}*/; + color: #fff /*{b-bar-color}*/; } .ui-bar-b .ui-link { - color: #7cc4e7 /*{global-link-color}*/; + color: #ddf0f8 /*{b-bar-link-color}*/; font-weight: bold; } +.ui-bar-b .ui-link:hover { + color: #ddf0f8 /*{b-bar-link-hover}*/; +} + +.ui-bar-b .ui-link:active { + color: #ddf0f8 /*{b-bar-link-active}*/; +} + +.ui-bar-b .ui-link:visited { + color: #ddf0f8 /*{b-bar-link-visited}*/; +} .ui-body-b { border: 1px solid #C6C6C6 /*{b-body-border}*/; background: #cccccc /*{b-body-background-color}*/; @@ -177,12 +215,26 @@ font-family: Helvetica, Arial, sans-serif /*{b-body-font}*/; } .ui-body-b .ui-link-inherit { - color: #333333 /*{b-body-color}*/; + color: #333333 /*{b-body-color}*/; } + .ui-body-b .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{b-body-link-color}*/; font-weight: bold; } + +.ui-body-b .ui-link:hover { + color: #2489CE /*{b-body-link-hover}*/; +} + +.ui-body-b .ui-link:active { + color: #2489CE /*{b-body-link-active}*/; +} + +.ui-body-b .ui-link:visited { + color: #2489CE /*{b-body-link-visited}*/; +} + .ui-btn-up-b { border: 1px solid #145072 /*{b-bup-border}*/; background: #2567ab /*{b-bup-background-color}*/; @@ -256,11 +308,26 @@ background-image: linear-gradient(top, #f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/); } +.ui-bar-c .ui-link-inherit { + color: #3E3E3E /*{c-bar-color}*/; +} .ui-bar-c .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #7cc4e7 /*{c-bar-link-color}*/; font-weight: bold; } +.ui-bar-c .ui-link:hover { + color: #2489CE /*{c-bar-link-hover}*/; +} + +.ui-bar-c .ui-link:active { + color: #2489CE /*{c-bar-link-active}*/; +} + +.ui-bar-c .ui-link:visited { + color: #2489CE /*{c-bar-link-visited}*/; +} + .ui-bar-c, .ui-bar-c input, .ui-bar-c select, @@ -287,14 +354,28 @@ .ui-body-c button { font-family: Helvetica, Arial, sans-serif /*{c-body-font}*/; } + .ui-body-c .ui-link-inherit { - color: #333333 /*{c-body-color}*/; + color: #333333 /*{c-body-color}*/; } + .ui-body-c .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{c-body-link-color}*/; font-weight: bold; } +.ui-body-c .ui-link:hover { + color: #2489CE /*{c-body-link-hover}*/; +} + +.ui-body-c .ui-link:active { + color: #2489CE /*{c-body-link-active}*/; +} + +.ui-body-c .ui-link:visited { + color: #2489CE /*{c-body-link-visited}*/; +} + .ui-btn-up-c { border: 1px solid #ccc /*{c-bup-border}*/; background: #eee /*{c-bup-background-color}*/; @@ -313,7 +394,7 @@ } .ui-btn-hover-c { - border: 1px solid #bbb /*{c-bhover-border}*/; + border: 1px solid #bbbbbb /*{c-bhover-border}*/; background: #dadada /*{c-bhover-background-color}*/; font-weight: bold; color: #101010 /*{c-bhover-color}*/; @@ -374,13 +455,27 @@ .ui-bar-d button { font-family: Helvetica, Arial, sans-serif /*{d-bar-font}*/; } + .ui-bar-d .ui-link-inherit { - color: #333 /*{d-bar-color}*/; + color: #333333 /*{d-bar-color}*/; } .ui-bar-d .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{d-bar-link-color}*/; font-weight: bold; } + +.ui-bar-d .ui-link:hover { + color: #2489CE /*{d-bar-link-hover}*/; +} + +.ui-bar-d .ui-link:active { + color: #2489CE /*{d-bar-link-active}*/; +} + +.ui-bar-d .ui-link:visited { + color: #2489CE /*{d-bar-link-visited}*/; +} + .ui-body-d { border: 1px solid #ccc /*{d-body-border}*/; color: #333333 /*{d-body-color}*/; @@ -400,13 +495,28 @@ .ui-body-d button { font-family: Helvetica, Arial, sans-serif /*{d-body-font}*/; } + .ui-body-d .ui-link-inherit { - color: #333333 /*{d-body-color}*/; + color: #333333 /*{d-body-color}*/; } + .ui-body-d .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{d-body-link-color}*/; font-weight: bold; } + +.ui-body-d .ui-link:hover { + color: #2489CE /*{d-body-link-hover}*/; +} + +.ui-body-d .ui-link:active { + color: #2489CE /*{d-body-link-active}*/; +} + +.ui-body-d .ui-link:visited { + color: #2489CE /*{d-body-link-visited}*/; +} + .ui-btn-up-d { border: 1px solid #ccc /*{d-bup-border}*/; background: #fff /*{d-bup-background-color}*/; @@ -487,12 +597,25 @@ font-family: Helvetica, Arial, sans-serif /*{e-bar-font}*/; } .ui-bar-e .ui-link-inherit { - color: #333 /*{e-bar-color}*/; + color: #333333 /*{e-bar-color}*/; } .ui-bar-e .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{e-bar-link-color}*/; font-weight: bold; } + +.ui-bar-e .ui-link:hover { + color: #2489CE /*{e-bar-link-hover}*/; +} + +.ui-bar-e .ui-link:active { + color: #2489CE /*{e-bar-link-active}*/; +} + +.ui-bar-e .ui-link:visited { + color: #2489CE /*{e-bar-link-visited}*/; +} + .ui-body-e { border: 1px solid #F7C942 /*{e-body-border}*/; color: #333333 /*{e-body-color}*/; @@ -513,12 +636,26 @@ font-family: Helvetica, Arial, sans-serif /*{e-body-font}*/; } .ui-body-e .ui-link-inherit { - color: #333333 /*{e-body-color}*/; + color: #333333 /*{e-body-color}*/; } + .ui-body-e .ui-link { - color: #2489CE /*{global-link-color}*/; + color: #2489CE /*{e-body-link-color}*/; font-weight: bold; } + +.ui-body-e .ui-link:hover { + color: #2489CE /*{e-body-link-hover}*/; +} + +.ui-body-e .ui-link:active { + color: #2489CE /*{e-body-link-active}*/; +} + +.ui-body-e .ui-link:visited { + color: #2489CE /*{e-body-link-visited}*/; +} + .ui-btn-up-e { border: 1px solid #F7C942 /*{e-bup-border}*/; background: #fadb4e /*{e-bup-background-color}*/; @@ -584,24 +721,6 @@ a.ui-link-inherit { text-decoration: none !important; } -/* links and their different states ------------------------------------------------------------------------------------------------------------*/ - -.ui-link{ - color: #2489CE /*{global-link-color}*/ -} - -.ui-link:hover{ - color: #2489CE /*{global-link-hover}*/ -} - -.ui-link:active{ - color: #2489CE /*{global-link-active}*/ -} - -.ui-link:visited{ - color: #2489CE /*{global-link-visited}*/ -} /* Active class used as the "on" state across all themes -----------------------------------------------------------------------------------------------------------*/ From b483eebc788c1207ffc7072add23274f18dedfc9 Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 3 Oct 2011 17:22:39 -0400 Subject: [PATCH 12/80] Added links to bar and content block examples. --- docs/api/themes.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/api/themes.html b/docs/api/themes.html index adba44ba..c93c1078 100755 --- a/docs/api/themes.html +++ b/docs/api/themes.html @@ -51,11 +51,11 @@

    The default theme contains the following five Bar styles:

    -
    Bar A
    -
    Bar B
    -
    Bar C
    -
    Bar D
    -
    Bar E
    +
    Bar A - Link
    +
    Bar B - Link
    +
    Bar C - Link
    +
    Bar D - Link
    +
    Bar E - Link

    By default, the framework assigns the "a" swatch to all headers and footers, because these are typically given high visual priority in an application. To set the color of a bar to a different swatch color, simply add the data-theme attribute to your header or footer and specify an alternate swatch letter ('b' or 'd', for example) and the specified theme swatch color will be applied. Learn more about toolbar theming.

    @@ -66,11 +66,11 @@

    The default theme also includes color swatch values for use in content blocks, designed to coordinate with the header color swatches in the theme.

    -
    Block A
    -
    Block B
    -
    Block C
    -
    Block D
    -
    Block E
    +
    Block A - Link
    +
    Block B - Link
    +
    Block C - Link
    +
    Block D - Link
    +
    Block E - Link
    From 51a4298f962f6c8e7f986aa26a8e99c124471e2a Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 4 Oct 2011 11:35:04 +0300 Subject: [PATCH 13/80] scrollview: Add "position: relative;" to class ui-scrollview-clip in order to confine scrollbars to scrollview container --- experiments/scrollview/jquery.mobile.scrollview.css | 1 + 1 file changed, 1 insertion(+) diff --git a/experiments/scrollview/jquery.mobile.scrollview.css b/experiments/scrollview/jquery.mobile.scrollview.css index 5112e431..f7e05521 100644 --- a/experiments/scrollview/jquery.mobile.scrollview.css +++ b/experiments/scrollview/jquery.mobile.scrollview.css @@ -1,6 +1,7 @@ @charset "utf-8"; .ui-scrollview-clip { + position: relative; } .ui-scrollview-view { From 4ed1e6ac11a6d0f94efe7bd5ca5393c01d0fd3bb Mon Sep 17 00:00:00 2001 From: Mat Marquis Date: Tue, 4 Oct 2011 14:01:08 -0400 Subject: [PATCH 14/80] =?UTF-8?q?Fixes=20#2595=20=E2=80=94=20Hidden=20?= =?UTF-8?q?=E2=80=9Cclick=20to=20expand=20contents=E2=80=9D=20text=20now?= =?UTF-8?q?=20changes=20depending=20on=20current=20expanded/hidden=20state?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/jquery.mobile.collapsible.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.collapsible.js b/js/jquery.mobile.collapsible.js index 67d69e13..a416276e 100644 --- a/js/jquery.mobile.collapsible.js +++ b/js/jquery.mobile.collapsible.js @@ -120,7 +120,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, { collapsibleHeading .toggleClass( "ui-collapsible-heading-collapsed", isCollapse) .find( ".ui-collapsible-heading-status" ) - .text( o.expandCueText ) + .text( isCollapse ? o.expandCueText : o.collapseCueText ) .end() .find( ".ui-icon" ) .toggleClass( "ui-icon-minus", !isCollapse ) From a20bb72a2945baa23eef84799acf0060860ae741 Mon Sep 17 00:00:00 2001 From: John Bender Date: Mon, 26 Sep 2011 14:00:17 -0700 Subject: [PATCH 15/80] whitespace in events --- js/jquery.mobile.event.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index 03bffaab..6a58cefa 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -118,11 +118,11 @@ $.event.special.tap = { // also handles swipeleft, swiperight $.event.special.swipe = { scrollSupressionThreshold: 10, // More than this horizontal displacement, and we will suppress scrolling. - + durationThreshold: 1000, // More time than this, and it isn't a swipe. - + horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this. - + verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this. setup: function() { From a0ddaab8e37cb8a38c7e5b144603ce16f672efa4 Mon Sep 17 00:00:00 2001 From: John Bender Date: Mon, 26 Sep 2011 14:03:28 -0700 Subject: [PATCH 16/80] fix for incorrect portrait of lanscape value The value attached to the event passed into handlers was based soley on screensize which is problematic given that some implementations (eg Android 2.3) don't change the screensize until after the event is fired. The orientation property appears to report a better value where it is provided so the solution is to prefer what it reports and then fallback to the screensize caculation where necessary. --- js/jquery.mobile.event.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index 6a58cefa..d0e105f5 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -242,8 +242,22 @@ $.event.special.swipe = { // Get the current page orientation. This method is exposed publicly, should it // be needed, as jQuery.event.special.orientationchange.orientation() $.event.special.orientationchange.orientation = get_orientation = function() { - var elem = document.documentElement; - return elem && elem.clientWidth / elem.clientHeight < 1.1 ? "portrait" : "landscape"; + var isPortrait = true, elem = document.documentElement; + + // prefer window orientation to the calculation based on screensize as + // the actual screen resize takes place before or after the orientation change event + // has been fired depending on implementation (eg android 2.3 is before, iphone after). + // More testing is required to determine if a more reliable method of determining the new screensize + // is possible when orientationchange is fired. (eg, use media queries + element + opacity) + if ( $.support.orientation ) { + // if the window orientation registers as 0 or 180 degrees report + // portrait, otherwise landscape + isPortrait = window.orientation % 180 == 0; + } else { + isPortrait = elem && elem.clientWidth / elem.clientHeight < 1.1; + } + + return isPortrait ? "portrait" : "landscape"; }; })( jQuery, window ); From ff9720281b25c68c779cd71955089408249fc734 Mon Sep 17 00:00:00 2001 From: toddparker Date: Tue, 27 Sep 2011 12:05:37 -0400 Subject: [PATCH 17/80] Added another check for orientation change event for Android 2.1 --- js/jquery.mobile.support.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index 21c25dda..15297173 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -64,7 +64,7 @@ $.mobile.browser.ie = (function() { $.extend( $.support, { - orientation: "orientation" in window, + orientation: "orientation" in window && "onorientationchange" in window, touch: "ontouchend" in document, cssTransitions: "WebKitTransitionEvent" in window, pushState: "pushState" in history && "replaceState" in history, From 57079e1d6bdfed77a67f1bd0480ac4a53fe56caf Mon Sep 17 00:00:00 2001 From: John Bender Date: Tue, 4 Oct 2011 11:48:01 -0700 Subject: [PATCH 18/80] add the ability to disable native orientation change support Fixes #793 the frequency of the triggered event in certain android releases ( 2.1, 2.2) appears to be dependent on a host of things other than an actual orientation change, eg alerts, zoom, and scrolling. This provides a way for the user to disable it in favor for using throttled resize while still making use of the window.orientation where its available for reliability --- js/jquery.mobile.core.js | 3 +++ js/jquery.mobile.event.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index e8f2faca..5807dac0 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -53,6 +53,9 @@ pushStateEnabled: true, + // turn of binding to the native orientationchange due to android orientation behavior + orientationChangeEnabled: true, + // Support conditions that must be met in order to proceed // default enhanced qualifications are media query support OR IE 7+ gradeA: function(){ diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index d0e105f5..8d2d5247 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -190,7 +190,7 @@ $.event.special.swipe = { setup: function() { // If the event is supported natively, return false so that jQuery // will bind to the event using DOM methods. - if ( $.support.orientation ) { + if ( $.support.orientation && $.mobile.orientationChangeEnabled ) { return false; } @@ -204,7 +204,7 @@ $.event.special.swipe = { teardown: function(){ // If the event is not supported natively, return false so that // jQuery will unbind the event using DOM methods. - if ( $.support.orientation ) { + if ( $.support.orientation && $.mobile.orientationChangeEnabled ) { return false; } @@ -216,6 +216,7 @@ $.event.special.swipe = { // Save a reference to the bound event handler. var old_handler = handleObj.handler; + handleObj.handler = function( event ) { // Modify event object, adding the .orientation property. event.orientation = get_orientation(); From 0ed1460279506ca40147f7087c3cbbfa04b9b162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 4 Oct 2011 13:54:00 -0400 Subject: [PATCH 19/80] Add swarminject.js to prepare for TestSwarm integration --- tests/unit/buttonMarkup/index.html | 2 ++ tests/unit/checkboxradio/index.html | 2 ++ tests/unit/collapsible/index.html | 2 ++ tests/unit/controlgroup/index.html | 4 +++- tests/unit/core/index.html | 2 ++ tests/unit/dialog/index.html | 2 ++ tests/unit/event/index.html | 2 ++ tests/unit/fieldContain/index.html | 11 +++++------ tests/unit/init/index.html | 3 ++- tests/unit/init/nopage.html | 4 +++- tests/unit/listview/index.html | 2 ++ tests/unit/listview/pushstate-tests.html | 2 ++ tests/unit/media/index.html | 2 ++ tests/unit/navigation/base-tests.html | 2 ++ tests/unit/navigation/index.html | 2 ++ tests/unit/navigation/push-state-dialog-tests.html | 4 +++- tests/unit/page-sections/index.html | 2 ++ tests/unit/page/index.html | 10 ++++++---- tests/unit/select/cached-tests.html | 4 +++- tests/unit/select/index.html | 2 ++ tests/unit/slider/index.html | 10 ++++++---- tests/unit/support/index.html | 2 ++ tests/unit/swarminject.js | 9 +++++++++ tests/unit/textinput/index.html | 2 ++ tests/unit/widget/index.html | 2 ++ 25 files changed, 72 insertions(+), 19 deletions(-) create mode 100755 tests/unit/swarminject.js diff --git a/tests/unit/buttonMarkup/index.html b/tests/unit/buttonMarkup/index.html index 68d8592e..e3108a1e 100644 --- a/tests/unit/buttonMarkup/index.html +++ b/tests/unit/buttonMarkup/index.html @@ -12,6 +12,8 @@ + + diff --git a/tests/unit/checkboxradio/index.html b/tests/unit/checkboxradio/index.html index 45074a12..d2350f15 100644 --- a/tests/unit/checkboxradio/index.html +++ b/tests/unit/checkboxradio/index.html @@ -15,6 +15,8 @@ + + diff --git a/tests/unit/collapsible/index.html b/tests/unit/collapsible/index.html index dbb46640..2adbde59 100644 --- a/tests/unit/collapsible/index.html +++ b/tests/unit/collapsible/index.html @@ -14,6 +14,8 @@ + + diff --git a/tests/unit/controlgroup/index.html b/tests/unit/controlgroup/index.html index f6e48151..c5336a44 100644 --- a/tests/unit/controlgroup/index.html +++ b/tests/unit/controlgroup/index.html @@ -15,6 +15,8 @@ + + @@ -71,7 +73,7 @@
    - +
    diff --git a/tests/unit/core/index.html b/tests/unit/core/index.html index 3a10d79c..0eb53347 100644 --- a/tests/unit/core/index.html +++ b/tests/unit/core/index.html @@ -16,6 +16,8 @@ + + diff --git a/tests/unit/dialog/index.html b/tests/unit/dialog/index.html index 4ee95e0a..3308010e 100644 --- a/tests/unit/dialog/index.html +++ b/tests/unit/dialog/index.html @@ -22,6 +22,8 @@ + + diff --git a/tests/unit/event/index.html b/tests/unit/event/index.html index f582a6c1..bdcc89de 100644 --- a/tests/unit/event/index.html +++ b/tests/unit/event/index.html @@ -16,6 +16,8 @@ + + diff --git a/tests/unit/fieldContain/index.html b/tests/unit/fieldContain/index.html index ebdb1f4a..e3642ac2 100644 --- a/tests/unit/fieldContain/index.html +++ b/tests/unit/fieldContain/index.html @@ -4,7 +4,7 @@ jQuery Mobile FieldContain Integration Test - + @@ -16,9 +16,8 @@ - - + @@ -29,13 +28,13 @@
    - +
    -
    - +
    +
  • diff --git a/tests/unit/init/index.html b/tests/unit/init/index.html index c185fc40..c1b40671 100644 --- a/tests/unit/init/index.html +++ b/tests/unit/init/index.html @@ -15,7 +15,8 @@ - + + diff --git a/tests/unit/init/nopage.html b/tests/unit/init/nopage.html index 584c8f75..4ceb7b9e 100644 --- a/tests/unit/init/nopage.html +++ b/tests/unit/init/nopage.html @@ -12,6 +12,8 @@ + +