Opened 10 years ago
Closed 9 years ago
#25539 closed defect (bug) (fixed)
customizer multiple color pickers should close when you click outside of them
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | minor | Version: | 3.6.1 |
Component: | Customize | Keywords: | has-patch 4.0-early |
Focuses: | administration | Cc: |
Description
when you have multiple color pickers in the same customizer section, you easily end up with all color pickers "opened", see attached screenshot.
To reproduce, add 2-3 color pickers in the same section, then click several times randomly on the color pickers.
Seems related to some code in /wp-admin/js/color-picker.(min.)js
which should close a color picker when you click outside it but seems it doesn't correctly handle multiple color pickers.
Attachments (2)
Change History (10)
This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.
10 years ago
#3
follow-up:
↓ 4
@
10 years ago
- Keywords needs-patch added
Hello afercia, thanks for the report.
I have tested this in Chrome and with the Twenty Fourteen theme which has two color pickers. I can reproduce this with these steps:
- Open the Customizer
- Click Select Color button for Site Title Color
- Select a color and don't close the picker
- Instead click Select Color for Background Color
- You will notice that the previous color picker is closed now
- Now select a color and don't close the picker
- Instead click Select Color for Site Title Color again
- You will notice that the previous color picker remains open
#4
in reply to:
↑ 3
@
10 years ago
Hello Ocean,
followed your steps, 3 times, WordPress 3.8.1 and Twenty Fourteen and I get different results depending on the browser used, for example:
- Firefox 27: exactly same results as yours
- Chrome 31: (yes I'm still on 31) at steps 5 the previous color picker is still open for me.
Moreover, I tested with a theme with more than 2 color pickers, I would suggest you to do the same and you will notice some more weird behavior, for example color pickers may randomly be still open when you click *outside* of any color picker, clicking for example on the section description.
Sorry I can't help more.
Andrea
#5
@
10 years ago
- Keywords has-patch added; needs-patch removed
I can't remember my reasoning at the time, but I think that I thought if you were dealing with multiple color pickers you might want to jump back and forth. But, if clicking off of a color picker closes it, it should behave that way universally, not with the special case of *except when clicking on another color picker.
Patch attached. In addition to fixing this bug, I cleaned up the file to fully conform to JS coding standards.
multiple color pickers opened