ruhley / angular-color-picker

Vanilla AngularJS Color Picker Directive with no requirement on jQuery
http://ruhley.github.io/angular-color-picker/
MIT License
165 stars 78 forks source link

Field doesn't become dirty if I change color with dragging #150

Closed aprudnikoff closed 7 years ago

aprudnikoff commented 7 years ago

When I choose color performing press-drag-release form field doesn't change $dirty, $pristine, $touched, $untouched values. But $viewValue and $modelValue are changed. Bound ng-model value as well.

But when I choose color with just simple click everything works well as it should.

aprudnikoff commented 7 years ago

The problem is here https://github.com/ruhley/angular-color-picker/blob/master/src/scripts/controller.js#L21-L23

It's made to fix #88, but it's done before checking and setting $dirty/$pristine.