diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-02-11 22:44:57 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-02-11 22:46:28 +0300 |
commit | 0c466438d1feaec302fec13eafeeb063bbfd6a19 (patch) | |
tree | 122ef3efb066d657172b4b23a34bff612c67500a /test/unit/offset.js | |
parent | e984d1c79cc476062818e03df04a366baa13d197 (diff) | |
download | jquery-0c466438d1feaec302fec13eafeeb063bbfd6a19.tar.gz jquery-0c466438d1feaec302fec13eafeeb063bbfd6a19.zip |
Offset: don't run scrollTop/scrollLeft iframe test in Android 2.3 & 4.0
Android 2.3 resize the iframe by its content meaning it's not possible
to scroll the iframe only its parent element.
It seems (not confirmed) in android 4.0 it's not possible to scroll
iframes from the code
Fixes gh-1981
Ref 4ab8603669e2bbc8644e402927c33ce422d7aaa3
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r-- | test/unit/offset.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js index 2f1784ca5..785b23961 100644 --- a/test/unit/offset.js +++ b/test/unit/offset.js @@ -536,11 +536,14 @@ test("iframe scrollTop/Left (see gh-1945)", function() { var ifDoc = jQuery( "#iframe" )[ 0 ].contentDocument; - // iPhone resize the iframe by its content - // meaning it's not possible to scroll the iframe only its parent element - if ( /iphone os/i.test( navigator.userAgent ) ) { - equal( true, true, "iPhone doesn't scroll the iframes" ); - equal( true, true, "iPhone doesn't scroll the iframes" ); + // Mobile Safari and Android 2.3 resize the iframe by its content + // meaning it's not possible to scroll the iframe only its parent element. + // It seems (not confirmed) in android 4.0 it's not possible to scroll iframes from the code. + if ( /iphone os/i.test( navigator.userAgent ) || + /android 2\.3/i.test( navigator.userAgent ) || + /android 4\.0/i.test( navigator.userAgent ) ) { + equal( true, true, "Can't scroll iframes in this environment" ); + equal( true, true, "Can't scroll iframes in this environment" ); } else { // Tests scrollTop/Left with iframes |