Alberplz / angular2-color-picker

Angular 2 Color Picker Directive, no dependences required.
MIT License
185 stars 82 forks source link

Using the 'top' position causes weird functionality #107

Closed samidabeast closed 7 years ago

samidabeast commented 7 years ago

I have my color picker set up as so: <input class="form-control input-sm" [(colorPicker)]="point.color" [style.background]="point.color" [value]="point.color" [cpPresetColors]="colorOptions" [cpFallbackColor]="'#F44336'" [cpPosition]="'top'" [cpPositionOffset]="'-25%'" [cpAlphaChannel]="'disabled'" name="color{{idx}}{{i}}" />

But setting the cpPosition to 'top', it opens to the top the first time, but it covers up the input. If you close it and reopen it, it appears at the bottom of the input. Screenshots below.

*Note: it works fine and stays where it should if I position it bottom, left, or right - but I don't wan't that because it causes my screen to scroll in those directions since this is close to the bottom of the screen.

Opening it the first time goes to the top: image

Opening it after the first time goes to the bottom: image

luisticona commented 7 years ago

@samidabeast Did you find any solution to fix this? I have the same issue.

samidabeast commented 7 years ago

@luisticona Apparently this repository is dead, so I upgraded to the latest one at : https://github.com/zefoy/ngx-color-picker they had a similar issue but it has been fixed.

luisticona commented 7 years ago

@samidabeast thanks for your help! with the change to ngx-color-picker it's working!