From c9f2b1eec5e8a9eaf10faae8a8accf0b771096e0 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 24 Nov 2011 19:28:09 -0800 Subject: feat(form): do not prevent submission if action attribute present --- src/widget/form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widget/form.js') diff --git a/src/widget/form.js b/src/widget/form.js index 51864cf0..76051832 100644 --- a/src/widget/form.js +++ b/src/widget/form.js @@ -61,8 +61,8 @@ angularWidget('form', function(form){ parentForm = $formFactory.forElement(formElement), form = $formFactory(parentForm); formElement.data('$form', form); - formElement.bind('submit', function(event){ - event.preventDefault(); + formElement.bind('submit', function(event) { + if (!formElement.attr('action')) event.preventDefault(); }); if (name) { this[name] = form; -- cgit v1.2.3