Index: branches/liangent/makeCollapsible_custom/phase3/resources/jquery/jquery.makeCollapsible.js |
— | — | @@ -282,14 +282,12 @@ |
283 | 283 | toggleLinkCustom( $(this), e, $that, $customTogglers ); |
284 | 284 | } ); |
285 | 285 | |
286 | | - // If there's no link for users using keyboard navigation |
287 | | - if ( !$customTogglers.is( 'a' ) && !$customTogglers.find( 'a' ).length ) { |
288 | | - $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) { |
289 | | - if ( e.which === 13 ) { // Enter key |
290 | | - toggleLinkCustom( $(this), e, $that, $customTogglers ); |
291 | | - } |
292 | | - } ); |
293 | | - } |
| 286 | + // For users using keyboard navigation |
| 287 | + $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) { |
| 288 | + if ( e.which === 13 ) { // Enter key |
| 289 | + toggleLinkCustom( $(this), e, $that, $customTogglers ); |
| 290 | + } |
| 291 | + } ); |
294 | 292 | } else { |
295 | 293 | mw.log( _fn + 'mw-customcollapsible: Missing toggler!' ); |
296 | 294 | } |