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

Props norcross.
Fixes #29471.


git-svn-id: https://develop.svn.wordpress.org/trunk@35099 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-13 01:07:21 +00:00
parent 681d100fd6
commit 32b604de00
1 changed files with 2 additions and 0 deletions

View File

@ -124,12 +124,14 @@
open: function() {
this.element.show().iris( 'toggle' ).focus();
this.button.removeClass( 'hidden' );
this.wrap.addClass( 'wp-picker-active' );
this.toggler.addClass( 'wp-picker-open' );
$( 'body' ).trigger( 'click.wpcolorpicker' ).on( 'click.wpcolorpicker', this.close );
},
close: function() {
this.element.hide().iris( 'toggle' );
this.button.addClass( 'hidden' );
this.wrap.removeClass( 'wp-picker-active' );
this.toggler.removeClass( 'wp-picker-open' );
$( 'body' ).off( 'click.wpcolorpicker', this.close );
},