primevue icon indicating copy to clipboard operation
primevue copied to clipboard

ColorPicker: Color resets to violet after sliding to the left

Open kentonbandy opened this issue 2 years ago • 2 comments

Describe the bug

Hello, I was playing with the ColorPicker on https://www.primefaces.org/primevue/colorpicker and I noticed that the color changes to violet when following these steps:

  • Move the vertical slider on the right to any color
  • Move the color picker circle all the way to the left side of the window
  • Move the color picker back to the right
  • Green value is 0, red and blue values are equal (I was watching the RGB values using dev tools)

Issue happens in Vue 2 and Vue 3 versions. Browser: Chrome

Reproducer

https://www.primefaces.org/primevue/colorpicker

PrimeVue version

latest

Vue version

2.x

Language

ES6

Build / Runtime

Vue CLI App

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Go to https://www.primefaces.org/primevue/colorpicker
  2. Move the vertical slider on the right to any color
  3. Move the color picker circle all the way to the left side of the window
  4. Move the color picker back to the right
  5. Green value is 0, red and blue values are equal (I was watching the RGB values using dev tools)

Expected behavior

When sliding the color picker circle to the left and back to the right, it should retain the color ratio indicated by the vertical slider.

kentonbandy avatar Jul 27 '22 19:07 kentonbandy

I've decided to try to fix this myself. Have fixed the main issue but still seeing odd behavior so looking further into it.

kentonbandy avatar Jul 27 '22 23:07 kentonbandy

I'm happy to report that the issue is addressed in this PR: https://github.com/primefaces/primevue/pull/2809

kentonbandy avatar Jul 28 '22 02:07 kentonbandy

https://user-images.githubusercontent.com/194784/214708923-629daa2f-c552-4289-8507-c3a4b55c4396.mov

davidglezz avatar Jan 26 '23 12:01 davidglezz