Alright, IE7 is fixed by r89613. IE6 stays problematic, for some reason it contains...
authorKrinkle <krinkle@users.mediawiki.org>
Mon, 6 Jun 2011 21:51:18 +0000 (21:51 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Mon, 6 Jun 2011 21:51:18 +0000 (21:51 +0000)
resources/jquery/jquery.tabIndex.js

index 4a42a7e..4c40677 100644 (file)
@@ -15,7 +15,7 @@ $.fn.firstTabIndex = function() {
                // becuase it has a default value for tabIndex in IE6/IE7 of 0
                // (rather than null/undefined). Therefore check "> 0" as well
                if ( tabIndex > 0 ) {
-                       if ( i === 0 ) {
+                       if ( minTabIndex === null ) {
                                minTabIndex = tabIndex;
                        } else if ( tabIndex < minTabIndex ) {
                                minTabIndex = tabIndex;
@@ -34,7 +34,7 @@ $.fn.lastTabIndex = function() {
        var maxTabIndex = null;
        $(this).find( '[tabindex]' ).each( function( i ) {
                var tabIndex = parseInt( $(this).attr( 'tabindex' ), 10 );
-               if ( i === 0 ) {
+               if ( maxTabIndex === null ) {
                        maxTabIndex = tabIndex;
                } else if ( tabIndex > maxTabIndex ) {
                        maxTabIndex = tabIndex;