This project is archived and is in readonly mode.

#2437 ✓resolved
Chris O'Meara

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

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>

People watching this ticket

Attachments

Pages