]> source.dussan.org Git - jquery.git/commitdiff
Attributes: fix tabIndex on <img> in IE11
authorJoelle Fleurantin <joasqueeniebee@gmail.com>
Sun, 18 Oct 2015 20:20:25 +0000 (16:20 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Sun, 25 Oct 2015 19:15:55 +0000 (15:15 -0400)
Fixes gh-2647
Closes gh-2664

(cherry picked from commit c752a5030bc00eb5b45dea9c28963f824a5c4f44)

Conflicts:
src/attributes/prop.js

test/unit/attributes.js

index ba9d551aa19234a1bb1c7c5f2356d36fd4621773..edd900161ae111731375acbdd270f360ad84b481 100644 (file)
@@ -733,6 +733,13 @@ QUnit.test( "prop('tabindex')", function( assert ) {
        assert.equal( jQuery( "#linkWithNoHrefWithNegativeTabIndex" ).prop( "tabindex" ), -1, "anchor without href, no tabindex set" );
 } );
 
+QUnit.test( "image.prop( 'tabIndex' )", function( assert ) {
+       assert.expect( 1 );
+       var image = jQuery("<img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' />")
+               .appendTo("#qunit-fixture");
+       assert.equal( image.prop("tabIndex" ), -1, "tabIndex on image" );
+} );
+
 QUnit.test( "prop('tabindex', value)", function( assert ) {
        assert.expect( 10 );