Problem on Firefox and :disable_with on remote forms (ajax) when using jQuery

Hi,

I’m not sure if I found a bug, or if I’m doing something wrong. Here
is what happens:

We’re using Rails 3.0.1 with jQuery instead of Prototype. When we
create a simple ajax form (using :remote => true) and
use :disable_with on the submit button, it works.

As a result of the Ajax call we use Javascript to replace the form by
another partial. Because page.replace does not work with jQuery, we’re
doing this:

=== response.js.erb ================
$(’#container_to_be_replaced’).html(’<%= escape_javascript
render :partial => ‘form’ %>’);

This works pretty well, but if I’m using Firefox, and I reload the
page (e.g. by pressing Command-R), the form will never be sent again.
This only happens when we use the “:disable_with” option for the
submit button. So I guess it must have something to do with the jQuery
version of rails.js.

I’ve prepared a short sample project:
git://github.com/easychris/testcase_disable_with_bug.git

Did I made a mistake, or do you think it’s a bug and I should open a
ticket?

Best
Chris

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs