Last modified: 2014-08-15 14:27:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53527 - Tablesorter places sort arrows to wrong row
Tablesorter places sort arrows to wrong row
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: 1.23.x release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 31601
  Show dependency treegraph
 
Reported: 2013-08-29 08:38 UTC by Niklas Laxström
Modified: 2014-08-15 14:27 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2013-08-29 08:38:56 UTC
Special:InviteSignup has following table structure:

<table>
 <thead>
  <tr>
   <th></th>
  </tr>
  <tr>
   <td></td>
  </tr>
 </thead>
 <tr>
   <td></td>
 </tr>
</table>

Sortable table places the sort arrows on the second tr, where I would expect them to be on the first one. I've identified the cause to be in buildHeaders line 314 of jquery.tablesorter.js:
				if ( cellArray.length >= maxSeen ) {
This makes it choose last longest row, instead of the first one. Changing that to '>' makes it work, but there might be better solutions.
Comment 1 Derk-Jan Hartman 2013-08-29 11:59:32 UTC
Tablesorter is expecting all elements in the thead to be columnheaders currently.
Comment 2 Bartosz Dziewoński 2013-11-30 18:20:14 UTC
Does https://gerrit.wikimedia.org/r/#/c/98250/ fix this?
Comment 3 Andre Klapper 2014-02-12 15:12:13 UTC
DJ: Will your patch in https://gerrit.wikimedia.org/r/#/c/98250/ fix this?
Comment 4 Andre Klapper 2014-05-21 14:31:18 UTC
DJ: Do you know if your patch in https://gerrit.wikimedia.org/r/#/c/98250/ will fix this?
Comment 5 Andre Klapper 2014-08-04 21:26:19 UTC
No reply - I assume this was fixed by https://gerrit.wikimedia.org/r/#/c/98250/2/resources/jquery/jquery.tablesorter.js which was merged in March.

If not, please reopen.
Comment 6 Niklas Laxström 2014-08-05 10:03:22 UTC
Not fixed. It seems worse now. The arrows are not visible and all the input elements on the second header row cannot be interacted with.
Comment 7 Derk-Jan Hartman 2014-08-06 11:19:46 UTC
@Niklas, that <form> inside the row is not really valid HTML5 I think. <form> is supposed to be in http://www.w3.org/TR/html5/dom.html#flow-content-1, and though <table> is flow-content, the <tr> itself only accepts a very limited amount of children: http://www.w3.org/TR/html5/tabular-data.html#the-tr-element

We should probably get that fixed. Now looking at the rest of this report..
Comment 8 Gerrit Notification Bot 2014-08-07 08:52:51 UTC
Change 152225 had a related patch set uploaded by TheDJ:
jquery.tablesorter: Only look at th's for headers

https://gerrit.wikimedia.org/r/152225
Comment 9 Gerrit Notification Bot 2014-08-15 13:32:53 UTC
Change 152225 merged by jenkins-bot:
jquery.tablesorter: Only look at th's for headers

https://gerrit.wikimedia.org/r/152225

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links