Skip to content

Commit

Permalink
Possible solution to bug, though it takes too long
Browse files Browse the repository at this point in the history
This still isn't ideal, even if it worked.
It's opaque why this needs to click escape.
  • Loading branch information
kienstra committed Sep 3, 2021
1 parent 6e9f837 commit f026292
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/src/block-editor/controls/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) }
</Button>
Expand Down

0 comments on commit f026292

Please sign in to comment.