You can clone with
No one assigned
do not work:
gem 'jquery-rails', '2.2.1'
Code for "disable_with":
<button data-disable-with="Please wait..." name="button" type="submit">Click to disable</button>
Code for "confirm":
<button data-confirm="Are you sure?" name="button" type="submit">Click to confirm</button>
See it in action here: https://github.com/john-999/disable_with_issue
This issue could be related to:
I can confirm this issue (no pun intended), but I could not even find a working version (tried several down to 1.0.19). data-confirm works fine on a-tags, but not on submit buttons. I built a workaround listening on the submit event for the form and display the confirmation dialogue myself.
I'm having problems with confirm too, I'm thinking it must be some conflict because it was working before... is there any known conflicts for this methods?
So is it fixed yet? Currently my app has: f.submit "Go!", :confirm=>"Are you sure?" at the end of a form, and the generated HTML is: <input data-confirm="Are you sure?" name="commit" type="submit" value="Go!" />. However, the confirmation does not work despite that the form operation works.
f.submit "Go!", :confirm=>"Are you sure?"
<input data-confirm="Are you sure?" name="commit" type="submit" value="Go!" />
I'm having the same issue! I've tried every method but I guess we have to avoid using submit for now...
So i don't include that string because we have very big platform and this is a long story)) But btw I include jquery and jquery_ujs in layout by hand (and i see them included on a site). Any ideas, what's going on?
ok, forget. I find out the mistake
what was the fix? @jughead
@realdlee, so the problem was with understanding how it works. I think that jquery_ujs sets callbacks with .on method on document root node. But my function stopped event propagation, thus this callback was never called.
Closing this one as the original issue was fixed. If anyone is still facing problems with confirm please open another issue describing the problem and how we can reproduce to get it fixed. Thanks everyone who walked @jughead through this one!
If you run into this issue: closing the tab and reopening it will fix it.