Skip to content

Ie submit bubbles#123

Closed
JangoSteve wants to merge 1 commit intorails:masterfrom
JangoSteve:ie-submit-bubbles
Closed

Ie submit bubbles#123
JangoSteve wants to merge 1 commit intorails:masterfrom
JangoSteve:ie-submit-bubbles

Conversation

@JangoSteve
Copy link
Member

This corrects the problem described in this comment.

Note that this patch depends on this pull request, so make sure to merge that one first!

Also note that the 2 test cases added technically passed if the test suite was run in FF, Chrome, Safari, or IE9. They would only fail in <IE9, and now they pass. I tried overriding the $.support.submitBubbles jQuery flag in these 2 tests to emulate IE behavior no matter what browser they're run from, but bad things happened and I didn't feel like spending time hacking something that may cause the tests to break with future versions of jQuery.

TL;DR Merge other pull request first, and remember to occasionally run test suite in IE7.

@neerajsingh0101
Copy link

I thought we stopped supporting IE !!!!

@JangoSteve
Copy link
Member Author

We, as in jquery-ujs, or we, as in the web development community? ;-) I wish the answer to both were "yes".

@jfirebaugh
Copy link

Me too...

Is there some way this can be fixed in jQuery instead?

@JangoSteve
Copy link
Member Author

Do we really not want to fix this in jquery-ujs? Here are my thoughts.

If there are any submit bindings on a form, then jquery-ujs will remotely submit the form before those bindings are ever called in IE, while the other bindings get called properly in every other browser. It is true that it's jQuery's fault for manually bubbling the submit event in a different order without consider binding execution order.

The end result, though, is that jquery-ujs does not behave consistently across browsers. So is the problem that jQuery has a bug, or that jquery-ujs relies on buggy methods?

Anyway, I can start a thread on the jquery-core list to see what they think about implementing a fix. Even if a fix is implemented in the next version of jQuery, jquery-ujs would still exhibit this inconsistent behavior for the other versions of jQuery which it still claims to support.

@mislav
Copy link
Member

mislav commented Mar 12, 2011

Wow this is hardcore. Thanks for investigating and patching. I will need some time and experimentation on my own to ensure this won't cause any problems, since you have to agree that the patch is pretty evil in what it does

@JangoSteve
Copy link
Member Author

Haha, thanks Mislav. Yes I absolutely do agree. I tested it pretty extensively with my stuff, but would feel better having a second opinion as well. Let me know if you have any questions or suggestions.

…rder for browsers that don't support event bubbling.
@neerajsingh0101
Copy link

Pulled in d2abd6f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants