diff --git a/js/src/block-editor/controls/image.js b/js/src/block-editor/controls/image.js index 5e640aea..1c7bc03f 100644 --- a/js/src/block-editor/controls/image.js +++ b/js/src/block-editor/controls/image.js @@ -103,7 +103,10 @@ const GcbImageControl = ( props ) => { id={ id } disabled={ !! isUploading } className="editor-media-placeholder__button" - onClick={ open } + onClick={ () => { + document.dispatchEvent( new KeyboardEvent( 'keyup', { key: 'Escape' } ) ); // eslint-disable-line no-undef + open(); + } } > { __( 'Media Library', 'genesis-custom-blocks' ) }