Skip to content

Commit c97e34d

Browse files
committed
Remove click outside behavior.
1 parent 55dc3de commit c97e34d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

core-blocks/block/edit-panel/index.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,6 @@ class SharedBlockEditPanel extends Component {
2626
this.handleFormSubmit = this.handleFormSubmit.bind( this );
2727
this.handleTitleChange = this.handleTitleChange.bind( this );
2828
this.handleTitleKeyDown = this.handleTitleKeyDown.bind( this );
29-
this.handleClickOutside = this.handleClickOutside.bind( this );
30-
}
31-
32-
componentDidMount() {
33-
document.addEventListener( 'click', this.handleClickOutside, true );
34-
}
35-
36-
componentWillUnmount() {
37-
document.removeEventListener( 'click', this.handleClickOutside, true );
38-
}
39-
40-
handleClickOutside( event ) {
41-
// The form is rendered only when isEditing.
42-
if ( this.props.isEditing && ! this.editForm.current.contains( event.target ) ) {
43-
this.props.onCancel();
44-
}
4529
}
4630

4731
componentDidUpdate( prevProps ) {

0 commit comments

Comments
 (0)