Steps to replicate the issue (include links if applicable):
- Go to this page on the French Wikipedia.
- Click on "(en)" after the red link "HASC" in the sortable table.
What happens?:
The sortable table is sorted.
What should have happened instead?:
We should have been sent to https://en.wikipedia.org/wiki/Hierarchical_administrative_subdivision_codes (the target of the link) instead.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
The issue has been discussed on the French Wikipedia village pump.
I think the issue comes from the fact that the <a> tag contains a <span> tag. In the jquery.tablesorter.js code, line 932, I think the second condition should be "e.currentTarget.nodeName.toLowerCase() === 'a'" instead of "e.target.nodeName.toLowerCase() === 'a'" so that the <a> tag is considered when clicking instead of the <span> tag. When trying with the updated code, the bug is fixed on this page.
Note: three other issues (here, here and here) are similar but date back from 2011 and are obsolete.