Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(form): do not prevent submit when action attribute equals to an empty string #3776

Closed
wants to merge 1 commit into from
Closed

Conversation

agentcooper
Copy link
Contributor

Closes #3370

@petebacondarwin
Copy link
Contributor

@agentcooper - Thanks for the PR!
The content of the commit LGTM.
Can you ensure you have signed the CLA.
Also, the commit message subject is too long. Can you fix it up?

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@ghost ghost assigned petebacondarwin Sep 18, 2013
Do not prevent submit when action
attribute equals to an empty string.

Closes #3370
@agentcooper
Copy link
Contributor Author

Real name for the CLA: Artem Tyurin

@Narretz Narretz modified the milestones: 1.3.0, Backlog Jun 25, 2014
@Narretz
Copy link
Contributor

Narretz commented Jul 9, 2014

I'd like to bump this for one of the next releases, but we should add a test for new case in formSpec.js

@caitp
Copy link
Contributor

caitp commented Sep 15, 2014

I guess it looks okay, it's a bit of a breaking change but I don't think it's likely to hurt anyone -- personally I would just say if (!isString(attr.action)) though

@@ -29,7 +29,7 @@ describe('event directives', function() {
}
};

element = $compile('<form action="" ng-submit="formSubmission($event)">' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not right. the point of the test is to simulate conditions when the form is being submitted. which means that we need the action attribute set to something

@IgorMinar
Copy link
Contributor

I fixed this PR and merged it in. thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form submit prevention changes
7 participants