- _bodyListener: function( event ) {
- if ( ! event.data.wrap.find( event.target ).length )
- event.data.toggler.click();
+ open: function() {
+ this.element.show().iris( 'toggle' ).focus();
+ this.button.removeClass( 'hidden' );
+ 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.toggler.removeClass( 'wp-picker-open' );
+ $( 'body' ).off( 'click.wpcolorpicker', this.close );