Fix switching between HTML blocks

[MAILPOET-2754]
This commit is contained in:
Rostislav Wolny
2020-03-10 17:22:42 +01:00
committed by Veljko V
parent 5c20c11ac9
commit 4ec53d2d52
2 changed files with 18 additions and 1 deletions

View File

@@ -22,3 +22,20 @@
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: space-between; justify-content: space-between;
} }
// Html blocks contains iframe which captures clicks and in some cases prevents selecting block.
// This adds an transparent overlay over the iframe.
.mailpoet-html-block-editor-content-wrapper {
position: relative;
&:after {
background: transparent;
content: ' ';
display: block;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}

View File

@@ -64,7 +64,7 @@ const CustomHtmlEdit = ({ attributes, setAttributes }) => {
return ( return (
<ParagraphEdit> <ParagraphEdit>
{inspectorControls} {inspectorControls}
<div> <div className="mailpoet-html-block-editor-content-wrapper">
<SandBox html={renderedContent} styles={styles} key={key} /> <SandBox html={renderedContent} styles={styles} key={key} />
</div> </div>
</ParagraphEdit> </ParagraphEdit>