From: Krinkle Date: Mon, 6 Jun 2011 20:57:28 +0000 (+0000) Subject: Fix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE6/IE7 (Thanks... X-Git-Tag: 1.31.0-rc.0~29653 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=b8876e8147b770fe7c8515719be0c4d125e73332;p=lhc%2Fweb%2Fwiklou.git Fix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE6/IE7 (Thanks TestSwarm). --- diff --git a/resources/jquery/jquery.tabIndex.js b/resources/jquery/jquery.tabIndex.js index ec5371d2d5..ab708c7bca 100644 --- a/resources/jquery/jquery.tabIndex.js +++ b/resources/jquery/jquery.tabIndex.js @@ -13,7 +13,10 @@ $.fn.firstTabIndex = function() { var tabIndex = parseInt( $(this).attr( 'tabindex' ), 10 ); if ( i === 0 ) { minTabIndex = tabIndex; - } else if ( tabIndex < minTabIndex ) { + // 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; } } );