http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89613

Revision: 89613
Author:   krinkle
Date:     2011-06-06 21:43:03 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Redo r89605 in a better way.

Modified Paths:
--------------
    trunk/phase3/resources/jquery/jquery.tabIndex.js

Modified: trunk/phase3/resources/jquery/jquery.tabIndex.js
===================================================================
--- trunk/phase3/resources/jquery/jquery.tabIndex.js    2011-06-06 21:24:23 UTC 
(rev 89612)
+++ trunk/phase3/resources/jquery/jquery.tabIndex.js    2011-06-06 21:43:03 UTC 
(rev 89613)
@@ -11,13 +11,15 @@
        var minTabIndex = null;
        $(this).find( '[tabindex]' ).each( function( i ) {
                var tabIndex = parseInt( $(this).attr( 'tabindex' ), 10 );
-               if ( i === 0 ) {
-                       minTabIndex = tabIndex;
                // In IE6/IE7 the above jQuery selector returns all elements,
                // becuase it has a default value for tabIndex in IE6/IE7 of 0
                // (rather than null/undefined). Therefore check "> 0" as well
-               } else if ( tabIndex > 0 && tabIndex < minTabIndex ) {
-                       minTabIndex = tabIndex;
+               if ( tabIndex > 0 ) {
+                       if ( i === 0 ) {
+                               minTabIndex = tabIndex;
+                       } else if ( tabIndex < minTabIndex ) {
+                               minTabIndex = tabIndex;
+                       }
                }
        } );
        return minTabIndex;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to