tablesorter – IE7 shrinking select boxes fix

· Bugs, IE7, tablesorter

I already blogged about the issue of IE7 shrinking select boxes bug whenever select options are added dynamically.

I just noted that the same issue reproduces when using tablesorter filter-select feature.

This great widget by mottie automatically generates select boxes per <th> that is marked with “filter-select” class.

Since on every sort and filter event the whole table and filter regenerate themselves, the IE7 bug reproduces here as well.

I added this code snippet to the sortEnd and filterEnd events, to fix the shrinking phenomenon:


//Detect IE7

var bIsIE7 = navigator.userAgent.match(/MSIE 7/);

//After tablesorter init:

if (bIsIE7) {
  $(‘table’).bind(“sortEnd”, function () {
  }).bind(“filterEnd”, function () {

//Fix IE7

function fixIE7() {
  $(“.tablesorter-filter”).each(function () {
    $(this).css(“width”, “1px”);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: