Closed
Description
When I reset widths, the following code block is executed in the ResizableReset function:
// restore the initial table width
if ( vars.overflow && vars.tableWidth ) {
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
if ( vars.useStorage ) {
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
}
}
If I reload my app, the table width will be 'auto' instead of vars.tableWidth in the following code block:
if ( vars.useStorage && vars.overflow ) {
// save table width
ts.storage( c.table, 'tablesorter-table-original-css-width', vars.tableWidth );
tmp = ts.storage( c.table, 'tablesorter-table-resized-width' ) || 'auto';
ts.resizable.setWidth( $table, tmp, true );
}
And if I reset again, the table width will be vars.tableWidth.
I can offer the following fix:
// restore the initial table width
if ( vars.overflow && vars.tableWidth ) {
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
if ( vars.useStorage ) {
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
}
}
// Also I found a small typo in line 408:
ts.storage( this, ts.css.resizableStorage, {} );
I think, the following code is should be here:
ts.storage( this, ts.css.resizableStorage, [] );
Metadata
Metadata
Assignees
Labels
No labels