Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#29471 closed enhancement (fixed)

add class for parent div on wpcolorpicker

Reported by: norcross Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: minor Version: 4.0
Component: Widgets Keywords: has-patch
Focuses: javascript Cc:


currently the wpColorPicker function adds the class a.wp-color-open to the button link a.wp-color-result, however, there is nothing done to the parent div (wp-picker-container). adding a class to the parent will allow devs to style the entire container, which includes the button, input field, optional default button, and palette itself.

Attachments (1)

29471.patch (653 bytes) - added by norcross 7 years ago.
adds an addClass and removeClass action for the wrap

Download all attachments as: .zip

Change History (8)

7 years ago

adds an addClass and removeClass action for the wrap

#1 @norcross
7 years ago

  • Keywords has-patch 2nd-opinion needs-testing added
  • Severity changed from normal to minor

#2 @norcross
7 years ago

I have a patch for the minified version as well, but wasn't sure if that needed to be submitted

#3 @mordauk
7 years ago

Patch looks good to me.

#4 @norcross
7 years ago

also, a bit of background: due to the event.stopPropagation() on the click action, it's extremely difficult to reliably attach any additional actions to it

#5 @mattwiebe
7 years ago

Sure, looks fine to me. I don't think you need to bother with the minified version, that gets taken care of by the committer.

#6 @wonderboymusic
6 years ago

  • Keywords 2nd-opinion needs-testing removed
  • Milestone changed from Awaiting Review to 4.4

#7 @wonderboymusic
6 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 35099:

Color Picker: when opening and closing, toggle a wp-picker-active class on the wrapper.

Props norcross.
Fixes #29471.

Note: See TracTickets for help on using tickets.