From f8fe616fdbac0ac8f9de2f5ae8d92e218fd2282e Mon Sep 17 00:00:00 2001 From: Jorge Date: Mon, 22 Oct 2018 19:23:07 +0100 Subject: [PATCH] Fix: Show resizer onMedia & Text block on unified toolbar mode. --- packages/block-library/src/media-text/edit.js | 2 ++ packages/block-library/src/media-text/editor.scss | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index 7570b2cc7b0530..8187d51c7e4b8c 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -104,6 +104,7 @@ class MediaTextEdit extends Component { attributes, className, backgroundColor, + isSelected, setAttributes, setBackgroundColor, } = this.props; @@ -111,6 +112,7 @@ class MediaTextEdit extends Component { const temporaryMediaWidth = this.state.mediaWidth; const classNames = classnames( className, { 'has-media-on-the-right': 'right' === mediaPosition, + 'is-selected': isSelected, [ backgroundColor.class ]: backgroundColor.class, } ); const widthString = `${ temporaryMediaWidth || mediaWidth }%`; diff --git a/packages/block-library/src/media-text/editor.scss b/packages/block-library/src/media-text/editor.scss index b0eccc5aace159..41c38c97758daf 100644 --- a/packages/block-library/src/media-text/editor.scss +++ b/packages/block-library/src/media-text/editor.scss @@ -51,8 +51,7 @@ figure.block-library-media-text__media-container { display: none; } -.editor-block-list__block.is-selected, -.editor-block-list__block.is-focused { +.wp-block-media-text.is-selected { .editor-media-container__resizer .components-resizable-box__handle { display: block; }