X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.makeCollapsible.js;h=19fdb2635da00cbd993e91f53acafda369a25a6d;hb=59ebff658ce912c1b0e7ef8d8f9bfec5a4e17b39;hp=f7c4217797979affd76d4c2a73149b24105a0d83;hpb=31d239f9d9e2516fc725d9b743ece0dfe72c23a2;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js index f7c4217797..19fdb2635d 100644 --- a/resources/src/jquery/jquery.makeCollapsible.js +++ b/resources/src/jquery/jquery.makeCollapsible.js @@ -159,8 +159,13 @@ } if ( e ) { - if ( e.type === 'click' && options.linksPassthru && $.nodeName( e.target, 'a' ) ) { - // Don't fire if a link was clicked, if requested (for premade togglers by default) + if ( + e.type === 'click' && + options.linksPassthru && + $.nodeName( e.target, 'a' ) && + $( e.target ).attr( 'href' ) !== '#' + ) { + // Don't fire if a link with href !== '#' was clicked, if requested (for premade togglers by default) return; } else if ( e.type === 'keypress' && e.which !== 13 && e.which !== 32 ) { // Only handle keypresses on the "Enter" or "Space" keys