-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Problem with <input type="email" /> and form validation #11652
Comments
Verified: I believe this is in fact an issue with 1.4. See this jsbin and enter Note: the |
Looks like ngAnimate is trying to animate where there's no animation and gets stuck. @matsko has pushed a lot of fixes which will be in rc.1. So it's possible this is already fixed. |
Indeed, it seems to have aready been fixed on master. |
Looks like it's working. Sorry for the bug. We should have a RC1 release later today. |
Closing for now, please re-open if the issue is still active. |
Unfortunately this is still broke. I made a new issue for it as this issue is closed: #11862 |
Ooops, really sorry for that 😞 The issue is indeed still reproducible on master: http://jsbin.com/tiwijowiza/3/edit (jsbin by @sravenhorst). |
A little more context: This does not only affect Still not sure what is going wrong with this.$$runValidators = function(modelValue, viewValue, doneCallback) {
...
if (!processParseErrors()) {...} // (1)
if (!processSyncValidators()) {...} // (2)
processAsyncValidators(); // (3)
... The problem begins when (on an invalid element) for a given input there is no parse error, but there is a sync-validator error (for the validator which has the same name as the parser), e.g. The series of events is as follows:
(Hopefully, @matsko can make better use of this info than me :)) |
A little more context: The series of animation described in (2) and (3) above, result in joining all the animations in one and merging their options, which in the end will result in But the joned animation is not cancelled, so one we hit the registered Thus the element's animation will remain in
All in all, this seems to be a more general bug in In the I am sure @matsko has a much better insight into the necessary fixes, but I would suspect something like modifying the if block in animateQueue.js#L381-L398 like this: if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {
if (animationCancelled) {...}
if (animationCancelled || (isStructural && animationDetails.event !== event)) {
options.domOperation();
runner.end();
}
// <new-snippet>
if (!isValidAnimation) clearElementAnimationState(element);
// </new-snipet>
return;
} |
I incorrectly assumed that /cc @matsko (if you think it's the right fix and want me to submit a PR, just lmk 😉) |
Thanks for all the effort so far! Great to see the quick investigation! |
Trying to remedy for tricking people into believing it was fixed 😄 |
…erly cleaned up Prior to this fix if the same CSS class was added and removed quickly then the element being animated would be left with a stale cache of the cancelled out animation. This would then result in follow-up animations being added to the previous animation which would then never run. A stale cache was to blame for that. This patch takes care of this issue. Closes angular#11652
…erly cleaned up Prior to this fix if the same CSS class was added and removed quickly then the element being animated would be left with a stale cache of the cancelled out animation. This would then result in follow-up animations being added to the previous animation which would then never run. A stale cache was to blame for that. This patch takes care of this issue. Closes angular#11652
…erly cleaned up Prior to this fix if the same CSS class was added and removed quickly then the element being animated would be left with a stale cache of the cancelled out animation. This would then result in follow-up animations being added to the previous animation which would then never run. A stale cache was to blame for that. This patch takes care of this issue. Closes angular#11652
After migration to 1.4 I discovered that form element does is not changing and does not get ng-dirty class is one of the form elements is input with type="email". Also with this input and forms are marked with attribute data-ng-animate="1"
The text was updated successfully, but these errors were encountered: