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.
$asyncValidators with $q.when on rejected promise makes ng-invalid/valid flicker #12107
Open
Description
http://jsbin.com/comocisuha/edit?html,css,js,output
It seems to have gotten worse in 1.4. Per docs ( https://docs.angularjs.org/api/ng/service/$q#when ) using $q.when
to wrap a third party promise, when using the Promise.reject()
that returns immediately, makes the input flicker a lot.
It doesn't happen when doing return $q.reject(false)
shot in the dark, I'm using ngAnimate and seems related to #11652 and is on and off (in my case, not in the plunkr)
EDIT2: I can confirm that the problem I'm facing is because of ngAnimate. (My inputs have a transition for box-shadow). Removed the dependency, and it's working as expected, but the plunkr issue happens regardless of ngAnimate