This project is archived and is in readonly mode.
Rails 3 and jQuery disable_with problem in IE 7 and below
Reported by Aaron Russell | December 8th, 2010 @ 09:34 PM
Am using the latest rails-ujs and jQuery v 1.4.4. Have experienced the following problem in IE7 and 6. I don't have access to IE8 or above to hand so haven't tested in those browsers - but certainly no problems in any other browser I've tested (all modern browsers).
Steps to reproduce:
Create a form using the :disable_with
attribute, view
the form in IE7 and click the submit button.
Expected behaviour:
The value of the submit button should be replaced with the
disable_with value, the button should be disabled and the form
should submit.
Actual behaviour:
The form fails to submit - so the value of the form is changed, the
button is disabled, but then nothing...
Additional info:
I'm not sure if this is a Rails bug or a jQuery bug, but am posting
it here as it affects Rails functionality. The problem seemed to be
party due to the usage of the jQuery live()
method to
attach the function to the event. A workaround I have used is to
unbind the function and re-bind it using plain old
bind()
.
/* Hacky fix */
$(disable_with_form_not_remote_selector).die('submit.rails', disable_with_input_function);
$(disable_with_form_not_remote_selector).bind('submit.rails', disable_with_input_function);
Comments and changes to this ticket
-
Neeraj Singh December 8th, 2010 @ 10:19 PM
- State changed from new to duplicate
- Importance changed from to Low
This is a jQuery bug.
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>