File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -547,4 +547,19 @@ test("fractions (see #7730 and #7885)", function() {
547547 div . remove ( ) ;
548548} ) ;
549549
550+ test ( "iframe scrollTop/Left (see gh-1945)" , function ( ) {
551+ expect ( 2 ) ;
552+
553+ // Tests scrollTop/Left with iframes
554+ var ifDoc = jQuery ( "#iframe" ) [ 0 ] . contentDocument ;
555+ jQuery ( "#iframe" ) . css ( "width" , "50px" ) . css ( "height" , "50px" ) ;
556+ ifDoc . write ( "<div style='width: 1000px; height: 1000px;'></div>" ) ;
557+
558+ jQuery ( ifDoc ) . scrollTop ( 200 ) ;
559+ jQuery ( ifDoc ) . scrollLeft ( 500 ) ;
560+
561+ equal ( jQuery ( ifDoc ) . scrollTop ( ) , 200 , "$($('#iframe')[0].contentDocument).scrollTop()" ) ;
562+ equal ( jQuery ( ifDoc ) . scrollLeft ( ) , 500 , "$($('#iframe')[0].contentDocument).scrollLeft()" ) ;
563+ } ) ;
564+
550565} ) ( ) ;
You can’t perform that action at this time.
0 commit comments