Index: trunk/phase3/resources/jquery/jquery.tabIndex.js |
— | — | @@ -11,13 +11,15 @@ |
12 | 12 | var minTabIndex = null; |
13 | 13 | $(this).find( '[tabindex]' ).each( function( i ) { |
14 | 14 | var tabIndex = parseInt( $(this).attr( 'tabindex' ), 10 ); |
15 | | - if ( i === 0 ) { |
16 | | - minTabIndex = tabIndex; |
17 | 15 | // In IE6/IE7 the above jQuery selector returns all elements, |
18 | 16 | // becuase it has a default value for tabIndex in IE6/IE7 of 0 |
19 | 17 | // (rather than null/undefined). Therefore check "> 0" as well |
20 | | - } else if ( tabIndex > 0 && tabIndex < minTabIndex ) { |
21 | | - minTabIndex = tabIndex; |
| 18 | + if ( tabIndex > 0 ) { |
| 19 | + if ( i === 0 ) { |
| 20 | + minTabIndex = tabIndex; |
| 21 | + } else if ( tabIndex < minTabIndex ) { |
| 22 | + minTabIndex = tabIndex; |
| 23 | + } |
22 | 24 | } |
23 | 25 | } ); |
24 | 26 | return minTabIndex; |