From d4e2a4bf577d3606b9920a3b1bbb3110d996f64d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 25 Oct 2011 14:41:58 +0000 Subject: [PATCH] (bug 31514) Followup r99031: allow clicking of links in table headers in a different way that doesn't break expand/collapse links. --- resources/jquery/jquery.tablesorter.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index 3b6de7b229..443024b4fc 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -585,8 +585,13 @@ cacheRegexs(); // Apply event handling to headers - // this is to big, perhaps break it out? + // this is too big, perhaps break it out? $headers.click( function( e ) { + if ( e.target.nodeName.toLowerCase() == 'a' ) { + // The user clicked on a link inside a table header + // Do nothing and let the default link click action continue + return true; + } if ( firstTime ) { firstTime = false; @@ -668,12 +673,7 @@ }; return false; } - } ) - // Allow links in headers to be clicked - .find( 'a' ).click( function( e ) { - e.stopPropagation(); } ); - } ); }, -- 2.20.1