primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Component: Primeng color picker is not working

Open DHANUSH-31 opened this issue 1 year ago • 14 comments

Describe the bug

angular version : 14 prime ng version : 9.1.3 color picker is not working

Environment

local

Reproducer

No response

Angular version

14.3.0

PrimeNG version

9.1.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

10.8.2

Browser(s)

chrome latest

Steps to reproduce the behavior

we have added the code for color picker and the shades are static image

Expected behavior

image

DHANUSH-31 avatar Oct 18 '24 11:10 DHANUSH-31

Having the same issue on Angular v18 & PrimeNg v17.18.11.

hsel-dove avatar Oct 19 '24 17:10 hsel-dove

any solution ?

DHANUSH-31 avatar Oct 21 '24 05:10 DHANUSH-31

Looks like the resource images are corrupted. I replaced the images and added some style in css. It worked. FYI: style.css / style.scss

/* You can add global styles to this file, and also import other style files */
.p-colorpicker-panel .p-colorpicker-color {
	background: transparent url("assets/img/custom-color.png") no-repeat left top
}


.p-colorpicker-panel .p-colorpicker-hue {
	background: transparent url("assets/img/custom-hue.png") no-repeat left top !important;
}

custom-color.png custom-color

custom-hue.png custom-hue

mrafiqk avatar Oct 23 '24 04:10 mrafiqk

Yep same here, Angular 18.2.8 and PrimeNG 17.18.11

image

horizoncarlo avatar Nov 15 '24 04:11 horizoncarlo

got the same issue with angular 17.1 and and primeng 17.18

robinschroeder58 avatar Dec 05 '24 13:12 robinschroeder58

The 17.18.10 last version where it works fine, 4 versions have already been released and the bug has not been fixed. 😰

Viktor-Ivliev avatar Dec 18 '24 09:12 Viktor-Ivliev

Eh yeah that's PrimeNG for ya

horizoncarlo avatar Dec 18 '24 18:12 horizoncarlo

@horizoncarlo Actually the guys do a great job (thank you for that), but sometimes they rush a lot and create bugs that paradoxically they don't rush to fix (.

Viktor-Ivliev avatar Dec 19 '24 10:12 Viktor-Ivliev

See https://github.com/primefaces/primeng/issues/13820#issuecomment-2564833659

ThoSap avatar Dec 29 '24 20:12 ThoSap

I have taken to hosting this internally so I can fix all the issues that keep coming up and are not resolved quickly. I like the components, but there seems to be many bugs that come up and are not promptly addressed.

For this issue the fix is as easy as adding "{encoding: false}" in gulpfile.js

gulp.task('copy-component-css', function () {
    return gulp.src(['src/app/components/**/*.css', 'src/app/components/**/images/*.png', 'src/app/components/**/images/*.gif'], { encoding: false }).pipe(gulp.dest('dist/resources/components'));
});

gulp.task('images', function () {
    return gulp.src(['src/app/components/**/images/*.png', 'src/app/components/**/images/*.gif'], { encoding: false }).pipe(flatten()).pipe(gulp.dest('dist/resources/images'));
});

kdfrie avatar Feb 05 '25 19:02 kdfrie

This is a duplicate of primefaces/primeng#16449

adama357 avatar Apr 21 '25 15:04 adama357

Please try; https://github.com/primefaces/primeng/issues/13820#issuecomment-2859607717

mertsincan avatar May 07 '25 17:05 mertsincan

Looks like the resource images are corrupted. I replaced the images and added some style in css. It worked. FYI: style.css / style.scss

/* You can add global styles to this file, and also import other style files */ .p-colorpicker-panel .p-colorpicker-color { background: transparent url("assets/img/custom-color.png") no-repeat left top }

.p-colorpicker-panel .p-colorpicker-hue { background: transparent url("assets/img/custom-hue.png") no-repeat left top !important; } custom-color.png custom-color

custom-hue.png custom-hue

Will this work for production environment?

hija-happy avatar Dec 07 '25 05:12 hija-happy

@hija-happy

Yes, but this has been fixed in newer versions.

Viktor-Ivliev avatar Dec 07 '25 14:12 Viktor-Ivliev