Skip to content

Commit

Permalink
Show Classic block contents on load (#25162)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Sep 8, 2020
1 parent 55edb95 commit 65c9f74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/classic/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export default class ClassicEdit extends Component {
if ( document.readyState === 'complete' ) {
this.initialize();
} else {
window.addEventListener( 'DOMContentLoaded', this.initialize );
document.addEventListener( 'readystatechange', () => {
if ( document.readyState === 'complete' ) {
this.initialize();
}
} );
}
}

Expand Down

0 comments on commit 65c9f74

Please sign in to comment.