rails/jquery-ujs

disabled_with not working with single button

ain opened this issue · 2 comments

ain commented

Steps to reproduce:

  1. Add button with following code in eRuby template
<%= button_tag :data => { :remote => "true", :url => some_path, :disable_with => '...' }, :type => :submit  do %> 
  Submit 
<% end %>
  1. Click Submit

What happens:

Submission happens, but disabled_with has no effect, button does not change

What should happen:

Button label should change to "...".

Tested browsers:

  • Safari Version 9.0.3 (11601.4.4)
  • Chrome Version 48.0.2564.116 (64-bit)
  • Firefox 42
ain commented

Note: same thing works with

<%= link_to some_path, :data => { :remote => "true", :url => some_path, :disable_with => '...' }, :type => :submit  do %> 
  Submit 
<% end %>
ain commented

Retested on 1.2.0 and could not reproduce. Considering fixed in most recent release.