This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Form submit prevention changes #3370
Closed
Description
Right now the condition is
if (!attr.action) {
// prevent submit
}
(https://github.com/angular/angular.js/blob/master/src/ng/directive/form.js#L310)
This breaks lots of existing forms with action=""
, which is useful when sending POST to the same page. In current situation, to fix this, we need to change our templates to something like action="<? $_SERVER['PHP_SELF'] ?>"
.
I suggest changing the condition to
if (!attr.action && attr.action !== '') {
// prevent submit
}
Does this make any sense?