Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColorPicker: GUI elements are not moved to selected color #9383

Closed
wlhUser opened this issue Nov 7, 2022 · 6 comments · Fixed by #9387
Closed

ColorPicker: GUI elements are not moved to selected color #9383

wlhUser opened this issue Nov 7, 2022 · 6 comments · Fixed by #9387
Assignees
Labels
🐞 defect Bug...Something isn't working
Milestone

Comments

@wlhUser
Copy link

wlhUser commented Nov 7, 2022

Describe the bug

In the colorPicker widget there are markers showing the selected color or hue. However these markers are not moved on selecting colors - one always stay in the upper left corner of the color selection box, while the other stays always on top of the hue selector.

It is only a minor bug, but users may get confused by the behavior.
colorPicker

Reproducer

For reproducing please have a look at the official online demo.
Just move the mouse in the color selector boy, and check if the little circle on the top left corner follows.
Try the same in the hue selector and check if the arrows on the top follow.
https://www.primefaces.org/showcase/ui/input/colorPicker.xhtml

Expected behavior

Should behave like the colorPicker of PrimeNg

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

PrimeFaces edition

Community

PrimeFaces version

12.0.1 11.0.8

Theme

No response

JSF implementation

All

JSF version

2.3

Java version

8,11

Browser(s)

Firefox 106, Edge 107, Chrome 107

@wlhUser wlhUser added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Nov 7, 2022
@melloware melloware changed the title colorPicker: GUI elements are not moved to selected color ColorPicker: GUI elements are not moved to selected color Nov 7, 2022
@melloware melloware removed the ‼️ needs-triage Issue needs triaging label Nov 7, 2022
@melloware
Copy link
Member

The original Jquery ColorPicker has not been updated in years and has some bugs. We have this open ticket: #8000

@wlhUser
Copy link
Author

wlhUser commented Nov 8, 2022

Have debugged the JS code and found that probably some casts to String are the problem. After removing them the colorPicker works as expected. The code is a bit ugly, as the JS-file is a compressed one. I attach both the corrected and the original one for an easier comparison. Needed to rename to *.txt, as otherwise I cannot attache the files.
-> primefaces-12.0.1.jar\META-INF\resources\primefaces\colorpicker\colorpicker.js

colorpicker_new.js.txt
colorpicker_orig.js.txt

melloware added a commit to melloware/primefaces that referenced this issue Nov 8, 2022
@melloware
Copy link
Member

Take a look at my PR.

@melloware melloware self-assigned this Nov 8, 2022
@melloware melloware added this to the 13.0.0 milestone Nov 8, 2022
@melloware
Copy link
Member

Thanks for tracking this down!

@melloware
Copy link
Member

@wlhUser thought you would be interested in this: #9797

@wlhUser
Copy link
Author

wlhUser commented Feb 16, 2023

@melloware Wow, looks great. Thanks for the notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working
Projects
None yet
2 participants