Skip to content

Commit

Permalink
Add comment to explain why overlay is being added
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed Feb 26, 2020
1 parent 9dd65d6 commit 8188419
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/html/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ class HTMLEdit extends Component {
html={ attributes.content }
styles={ styles }
/>
{/*
An overlay is added when the block is not selected in order to register click events as
some browsers do not bubble up the clicks from the sandboxed iframe, which makes it
difficult to reselect the block.
*/}
{ ! this.props.isSelected && (
<div className="block-library-html__preview-overlay"></div>
) }
Expand Down

0 comments on commit 8188419

Please sign in to comment.