#1319 ✓invalid
Tobi Ogunbiyi

button :disable _with doesn't work because there's no AJAX "before" event handler

Reported by Tobi Ogunbiyi | February 20th, 2012 @ 12:45 AM

I am currently using Prototype 1.7_rc2 with Rails 3.0.9 within the context of a form_tag, When I set the :disable_with symbol of the submit_tag of a button, the button does not get disabled and the "disable with" text doesn't get displayed either. After a lot of snooping around and debugging to find out if the issue was with how I was using the submit_tag or form_tag, I realized the button was only disabled right after the AJAX response was received. I believe that the problem is because there is not AJAX "before" event handler when I changed the existing AJAX "after" event handler, I got the button to be disabled.

I'm not sure if the button was not disabled for me because I am doing something horribly wrong or it is an issue with the Prototype framework code. As a side note, this is a regression from Rails 2.3 :)

Here is a link to the form form which the button was clicked and the diff of the changes I made to the rails.js file.

FORM: http://pastie.org/3417214
DIFF: http://pastie.org/3417207

Thanks,
Tobi.

Comments and changes to this ticket

  • Andrew Dupont

    Andrew Dupont March 4th, 2012 @ 07:53 AM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”

    I'm not sure if the button was not disabled for me because I am doing something horribly wrong or it is an issue with the Prototype framework code. As a side note, this is a regression from Rails 2.3 :)

    Not sure either, but if it's an issue it'd be with the Prototype version of rails.js, so please file a bug with that project.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages