mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Use calculated index instead of DOM index
There seems to be a scenario when there are multiple `thead` entries in a table where some versions of Firefox (around 47) return -1 for `cell.parentNode.rowIndex`, which winds up with the whole top part being laid out wrongly. However, I looked this over and did not see any reason why not to use the calculated `i` for the row index instead.
This commit is contained in:
parent
52e8c024b0
commit
6beda6a7ba
@ -548,7 +548,7 @@
|
||||
timer = new Date();
|
||||
}
|
||||
// children tr in tfoot - see issue #196 & #547
|
||||
// don't pass table.config to computeColumnIndex here - widgets (math) pass it to "quickly" index tbody cells
|
||||
// don't pass table.config to CColumnIndex here - widgets (math) pass it to "quickly" index tbody cells
|
||||
c.columns = ts.computeColumnIndex( c.$table.children( 'thead, tfoot' ).children( 'tr' ) );
|
||||
// add icon if cssIcon option exists
|
||||
icon = c.cssIcon ?
|
||||
@ -2240,7 +2240,7 @@
|
||||
cells = $rows[ i ].cells;
|
||||
for ( j = 0; j < cells.length; j++ ) {
|
||||
cell = cells[ j ];
|
||||
rowIndex = cell.parentNode.rowIndex;
|
||||
rowIndex = i;
|
||||
rowSpan = cell.rowSpan || 1;
|
||||
colSpan = cell.colSpan || 1;
|
||||
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user