mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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 (cherry-picked from0c466438d1
) Fixes gh-1981 Ref4ab8603669
This commit is contained in:
parent
939e755163
commit
f2ea60cfe8
@ -552,11 +552,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
|
||||
|
Loading…
Reference in New Issue
Block a user