aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/formSpec.js
AgeCommit message (Collapse)Author
2013-06-19feat(jqLite): switch bind/unbind to more recent jQuery on/offMichał Gołębiowski
jQuery switched to a completely new event binding implementation as of 1.7.0, centering around on/off methods instead of previous bind/unbind. This patch makes jqLite match this implementation while still supporting previous bind/unbind methods.
2013-03-14Fix failing test in IE 10Shyam Seshadri
2012-11-26feat(form): add ability to reset a form to pristine statePawel Kozlowski
Retting a form to pristine state will cause all of the nested form and form controls to be recursively reset as well. Closes #856
2012-09-06fix(FormController): propagate dirty state to parent formsKai Groner
2012-08-10fix(form): prevent page reload when form destroyedIgor Minar
this fix ensures that we prevent the default action on form submission (full page reload) even in cases when the form is being destroyed as a result of the submit event handler (e.g. when route change is triggered). The fix is more complicated than I'd like it to be mainly because we need to ensure that we don't create circular references between js closures and dom elements via DOM event handlers that would then result in a memory leak. Also the differences between IE8, IE9 and normal browsers make testing this ugly. Closes #1238
2012-08-07test(form): fix broken preventDefault testIgor Minar
the original test relied on incorrect assumptions about how jasmine async tests work (when setTimeout is triggered) and how browser reloads a page (the sequence of events) and thus the test passes even when the default is not prevented. this change fixes the test by registering an extra submit event handler that checks if the default was prevented. if the default was not prevented, the test will fail and the page will be reloaded causing the test runner to panic.
2012-08-07refactor(formSpec): group preventDefault specs into a describeIgor Minar
2012-04-09chore(tests): rename all directive names to the normalized formIgor Minar
2012-04-03fix(form): preperly clean up when invalid widget is removedMisko Hevery
Removing invalid widget sometimes resulted in improper cleanup of the form state.
2012-04-03feat(ngModel): update model on each key stroke (revert ngModelInstant)Vojta Jina
It turns out that listening only on "blur" event is not sufficient in many scenarios, especially when you use form validation you always had to use ngModelnstant e.g. if you want to disable a button based on valid/invalid form. The feedback we got from our apps as well as external apps is that the ngModelInstant should be the default. In the future we might provide alternative ways of suppressing updates on each key stroke, but it's not going to be the default behavior. Apps already using the ngModelInstant can safely remove it from their templates. Input fields without ngModelInstant directive will start propagating the input changes into the model on each key stroke.
2012-03-28chore(module): move files around in preparation for more modulesMisko Hevery