Uniform seems to affect jQuery .change event in IE8 only #152

Closed
ghost opened this Issue Mar 24, 2011 · 9 comments

Projects

None yet

5 participants

@ghost
ghost commented Mar 24, 2011

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?

@johnallan

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

@johnallan

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);
            });
@evantishuk

Line 1642? Do you mean 464?

@fidian fidian added a commit that referenced this issue Sep 11, 2012
@fidian fidian Taking suggestion from issue #152 c402b36
@fidian
Collaborator
fidian commented Oct 23, 2012

Does the current master or develop branches work for you?

@fidian
Collaborator
fidian commented Nov 14, 2012

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.

@fidian fidian closed this Nov 14, 2012
@gerwout
gerwout commented Dec 18, 2012

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.

@jasonsee

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

@fidian fidian reopened this Jan 25, 2013
@fidian
Collaborator
fidian commented Jan 25, 2013

@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.

@fidian
Collaborator
fidian commented Feb 12, 2013

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.

@fidian fidian closed this Feb 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment