diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index a348babf1af2..ed9172b87f69 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -307,7 +307,7 @@ var formDirectiveFactory = function(isNgForm) { compile: function() { return { pre: function(scope, formElement, attr, controller) { - if (!attr.action) { + if (!attr.action && attr.action !== '') { // we can't use jq events because if a form is destroyed during submission the default // action is not prevented. see #1238 // diff --git a/test/ng/directive/ngEventDirsSpec.js b/test/ng/directive/ngEventDirsSpec.js index 5b73c2dd6a8b..de9410a1de44 100644 --- a/test/ng/directive/ngEventDirsSpec.js +++ b/test/ng/directive/ngEventDirsSpec.js @@ -12,7 +12,7 @@ describe('event directives', function() { describe('ngSubmit', function() { it('should get called on form submit', inject(function($rootScope, $compile) { - element = $compile('
' + + element = $compile('' + '' + '
')($rootScope); $rootScope.$digest(); @@ -29,7 +29,7 @@ describe('event directives', function() { } }; - element = $compile('
' + + element = $compile('' + '' + '
')($rootScope); $rootScope.$digest();