Skip to content

Commit

Permalink
Iframed editor: fix embed dimensions with missing wp-embed-responsive…
Browse files Browse the repository at this point in the history
… class (#32057)
  • Loading branch information
ellatrix authored and youknowriad committed May 31, 2021
1 parent 8899a3c commit 9ede36c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ function setBodyClassName( doc ) {
for ( const name of document.body.classList ) {
if ( name.startsWith( 'admin-color-' ) ) {
doc.body.classList.add( name );
} else if ( name === 'wp-embed-responsive' ) {
// Ideally ALL classes that are added through get_body_class should
// be added in the editor too, which we'll somehow have to get from
// the server in the future (which will run the PHP filters).
doc.body.classList.add( 'wp-embed-responsive' );
}
}
}
Expand Down

0 comments on commit 9ede36c

Please sign in to comment.