AudithSoftworks/Uniform

Uniform seems to affect jQuery .change event in IE8 only

Opened this issue · 9 comments

I have a select element, #top-categories and if uniform is applied to this, it seems to disable the following JS in IE8:

if ($('#top-categories').length > 0) {
  $('#top-categories').change(function() {
    window.location = '/find-a-supplier/' + $(this).children('option:selected').val();
  });
}

In fact, it doesn't even let you make the selection – just continues showing the default option.

It works fine in every other browser (IE7 and 9, Chrome, Firefox 3 and 4 and Safari), and doesn't throw JS errors at any time, even in IE8 where the problem exists. Anyone else come across this?

I am seeing a similar behavior with a file input. The change event does not fire in IE8,

The comment states this is only an issue in IE7 but it appears to also be an issue in IE8

// IE7 doesn't fire onChange until blur or second fire.

On line 1642 where you have:

            $el.bind('click.uniform.ie7', function () {
                setTimeout(setFilename, 0);
            });

Replace it with:

            $el.bind('click.uniform.ie7', function () {
                setTimeout(function(){
                    $el.trigger('change');
                    setFilename();
                }, 0);
            });

Line 1642? Do you mean 464?

Does the current master or develop branches work for you?

I hope the commit is working for you. If not, please open a new issue, since I'll be closing this one due to the lack of a response.

I can confirm that this bug is not fixed (tried the latest development branch).
In IE8 it will not fire the change event for select elements, the option that has been selected will not be set as well.

I can confirm this is still an issue for both IE8 and IE9 using the dev branch (.v2.0.0)

@jasonsee - would you be willing to throw together a sample page so I can see it working or failing? There's a starting point at https://gist.github.com/4328659 if that helps.

Closing again due to a lack of reply. @jasonsee - let me know if you ever get around to showing me something that breaks. I'm interested in fixing any problems that crop up, but it is difficult to fix a problem I can't see.