summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiangent <liangent@users.mediawiki.org>2011-10-30 11:14:11 +0000
committerLiangent <liangent@users.mediawiki.org>2011-10-30 11:14:11 +0000
commit8120bbead4538c52fe783978ea7de8ca82af726e (patch)
tree14d11f141f5b97cb0d2c896c4759df19743ac4b5
parent18fd8f0efa49c2b32b80cfa97e2a5cc4adf9309d (diff)
Remove the check for the existence of <a> tags as they can be regular links to other pages.origin/make-collapsible-custom
Notes
http://mediawiki.org/wiki/Special:Code/MediaWiki/101297
-rw-r--r--resources/jquery/jquery.makeCollapsible.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/resources/jquery/jquery.makeCollapsible.js b/resources/jquery/jquery.makeCollapsible.js
index 4be5134587c1..0e16476d233c 100644
--- a/resources/jquery/jquery.makeCollapsible.js
+++ b/resources/jquery/jquery.makeCollapsible.js
@@ -282,14 +282,12 @@ $.fn.makeCollapsible = function() {
toggleLinkCustom( $(this), e, $that, $customTogglers );
} );
- // If there's no link for users using keyboard navigation
- if ( !$customTogglers.is( 'a' ) && !$customTogglers.find( 'a' ).length ) {
- $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) {
- if ( e.which === 13 ) { // Enter key
- toggleLinkCustom( $(this), e, $that, $customTogglers );
- }
- } );
- }
+ // For users using keyboard navigation
+ $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) {
+ if ( e.which === 13 ) { // Enter key
+ toggleLinkCustom( $(this), e, $that, $customTogglers );
+ }
+ } );
} else {
mw.log( _fn + 'mw-customcollapsible: Missing toggler!' );
}