This project is archived and is in readonly mode.
Remote forms with multiple submit controls don't report which submit was used, under Unobtrusive JavaScript
-
Andrew White
- Importance changed from to Low
Is this in the prototype or jquery version of rails.js?
It appears to be fixed in the prototype version:
https://github.com/rails/prototype-ujs/commit/f60d60dddcf0dd1f1ae45...If you want to make a patch but you are behind a firewall then you can use a http clone url and submit a patch as described in the contributor guide.
-
Chowlett
jQuery version. Thanks for the HTTP link - I'll look into getting a patch up.
-
Chowlett
Patch file below. Apologies for the patch comment; I had to change my author details post-commit.
I'm not very experienced with JavaScript, so it's entirely possible this is a horrible way to fix the problem. I also don't understand the test-suite enough to update the tests, I'm afraid. Still, for what it's worth, here's the patch.
-
Neeraj Singh
- Assigned user set to Neeraj Singh
Take a look at this. https://github.com/rails/jquery-ujs/issues#issue/18
The tests are failing for this pull request on FF. Not sure why. I will take a look this weekend.
-
Chowlett
Neeraj - a quick check with FireBug confirms what I was trying to workaround with the
originalEvent;e.targetis the form element, not the submit control. -
pederbl (at jobstar)
i just copied the prototype fix in jquery syntax and it works great for me. what is the best way to apply the fix.
why is the priority low for this? it seems like a major bug to me.
-
Neeraj Singh
- State changed from new to resolved
Chris:
Can you submit your patch as a pull request on juqery-ujs. It's much easier to manage all tickets at one place (jquery-ujs issues).
Thanks
-
Chowlett
Sorry, I'm still very new to Lighthouse and git. Can you clarify / explain what you want me to do, exactly?
