We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b587a43 commit 55dc3deCopy full SHA for 55dc3de
core-blocks/block/edit-panel/index.js
@@ -38,11 +38,8 @@ class SharedBlockEditPanel extends Component {
38
}
39
40
handleClickOutside( event ) {
41
- if ( ! this.editForm.current ) {
42
- return;
43
- }
44
-
45
- if ( ! this.editForm.current.contains( event.target ) ) {
+ // The form is rendered only when isEditing.
+ if ( this.props.isEditing && ! this.editForm.current.contains( event.target ) ) {
46
this.props.onCancel();
47
48
0 commit comments