-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix optionsBeforeSubmit + optionConvertHidden for non type=submit actions. #94
Conversation
@nathankot Thanks for submitting this pull request! It is really appreciated, but when testing your changes against the example/nodejs app, Example 2 fails, because the trigger function is a jQuery method. I tried to use triggerHandler, but it does not trigger the submit either, the only thing I have had luck with is form[0].submit, are you able to get Example 2 working with the trigger change? Thanks Tom |
@twilson63 hey Tom! Ahh I didn't take into account that karma was pulling in jQuery, jqLite supports triggerHandler() but it doesn't fire the default event action so I'm gonna use a combination of |
Cool! Yeah, I need to remove jquery from karma - :) Thx Tom On Thu, Jan 2, 2014 at 8:04 PM, Nathan Kot [email protected] wrote:
Tom Wilson This e-mail may contain information that is confidential, privileged or |
Merged and released 5.6, please review if you have time. |
@twilson63 thanks for the pull! Will take a look as soon as I can 😄 |
This should address #89, and possibly #93
I was running into a problem where ngBeforeSubmit wasn't being called at all.
Dug a bit deeper and found that the
submit
event wasn't being fired onform
when usingform[0].submit()
. This seems to confirm it:http://stackoverflow.com/a/18774921/1740868
Probably what was happening, is that the options worked for those using
<input type=submit>
and failed for people using the<div>
or<a>
submitbuttons.
Also updated the readme to show the correct directive for the beforeSubmit option.