primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.92k stars 1.25k forks source link

ColorPicker: Color resets to violet after sliding to the left #2808

Open kentonbandy opened 2 years ago

kentonbandy commented 2 years ago

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:

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 commented 2 years ago

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 commented 2 years ago

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

davidglezz commented 1 year ago

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