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

Two events fired on first select #92

Closed zaalbarxx closed 8 years ago

zaalbarxx commented 8 years ago

Hi! I have the problem with selecting the color from picker, because the first time I open it and select some value onChange event gets fired twice. I checked the call stack and the event is fired by both onColorClick and onMouseUp events. After that it seems like it's working fine. Not sure if this is something I broke with my fork, but it does not seems so. I am using hsv format and I tried to set the value initially to both null and hsv string or object. Maybe you have some rough idea what can be potentially wrong here ? EDIT: the first ng-model value is always (0, 0%, 100%)

ruhley commented 8 years ago

Fixed in commit b9404ddb157b05113a9d3e6b1b90ee0f94114070 and released in v2.1.6