primevue
primevue copied to clipboard
ColorPicker: Color resets to violet after sliding to the left
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
- Go to https://www.primefaces.org/primevue/colorpicker
- 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)
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.
I've decided to try to fix this myself. Have fixed the main issue but still seeing odd behavior so looking further into it.
I'm happy to report that the issue is addressed in this PR: https://github.com/primefaces/primevue/pull/2809
https://user-images.githubusercontent.com/194784/214708923-629daa2f-c552-4289-8507-c3a4b55c4396.mov