http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90239
Revision: 90239 Author: mah Date: 2011-06-16 22:27:22 +0000 (Thu, 16 Jun 2011) Log Message: ----------- Fix Bug #28344 - ?\226?\128?\156Links doesn't work inside collapsible toggles?\226?\128?\157 Patch from mybugs.mail If a link is added inside of a collapsible toggle and a user click on it, the target page should be opened. ?\226?\128?\166 The attached patch was tested locally and fixes this bug (clicking outside the link toogles the collapsed content, and clicking on the link opens the target page). PS: It is the same code which was used to fix the problem on Commons. http://commons.wikimedia.org/w/index.php?diff=45383826&oldid=45265712 Modified Paths: -------------- trunk/phase3/CREDITS trunk/phase3/resources/jquery/jquery.makeCollapsible.js Modified: trunk/phase3/CREDITS =================================================================== --- trunk/phase3/CREDITS 2011-06-16 22:23:37 UTC (rev 90238) +++ trunk/phase3/CREDITS 2011-06-16 22:27:22 UTC (rev 90239) @@ -125,6 +125,7 @@ * Mormegil * MrPete * MZMcBride +* mybugs.mail * Nakon * Nathan Larson * nephele Modified: trunk/phase3/resources/jquery/jquery.makeCollapsible.js =================================================================== --- trunk/phase3/resources/jquery/jquery.makeCollapsible.js 2011-06-16 22:23:37 UTC (rev 90238) +++ trunk/phase3/resources/jquery/jquery.makeCollapsible.js 2011-06-16 22:27:22 UTC (rev 90239) @@ -176,6 +176,9 @@ }, // Toggles collapsible and togglelink class toggleLinkPremade = function( $that, e ) { + if ( $(e.target).is('a') ) { + return true; + } var $collapsible = $that.eq(0).closest( '.mw-collapsible.mw-made-collapsible' ).toggleClass( 'mw-collapsed' ); e.preventDefault(); e.stopPropagation(); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs