This project is archived and is in readonly mode.
FormTagHelper#submit_tag outputs invalid Javascript for IE
Reported by Chris O'Meara | April 7th, 2009 @ 03:18 AM | in 2.x
It looks like the submit tag recently got an update to preserve the value of the commit attribute when using the disable_with option. The new behavior works fine in FFox and Safari but breaks in IE due to a limitation in the IE DOM which only allows you set an element's type property once. This restriction doesn't work with cloneNode which sets the type property based on the node you're cloning.
The fix uses createElement to achieve a similar effect to cloneNode.
Patch is attached.
Here's a blog reference (not mine): http://bit.ly/lu873. See the section called "And your type attribute too."
Comments and changes to this ticket
-
CancelProfileIsBroken August 6th, 2009 @ 01:28 PM
- Tag changed from clonenode, form_tag_helper, javascript, patch, submit_tag to bugmash, clonenode, form_tag_helper, javascript, patch, submit_tag
-
Rizwan Reza August 8th, 2009 @ 04:52 PM
-1 The patch doesn't apply neither to 2-3-stable nor master.
-
Tim Caswell August 8th, 2009 @ 10:35 PM
There was a commit last March that fixes the IE problem. That's why this patch doesn't apply cleanly.
http://github.com/rails/rails/commit/9537fd0e3a7625afe4bee75d749647...
-
CancelProfileIsBroken August 9th, 2009 @ 03:13 AM
- Tag changed from bugmash, clonenode, form_tag_helper, javascript, patch, submit_tag to clonenode, form_tag_helper, javascript, patch, submit_tag
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>