From 7f57989825194e0fa721599f9a40688209f8445f Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 8 Mar 2019 14:40:27 +0000 Subject: [PATCH 1/2] Set minHeight based on fontSize or style. --- packages/editor/src/components/rich-text/index.native.js | 2 +- packages/editor/src/components/rich-text/style.native.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 5cf1bb3fd2eb01..c241a0bc3246fa 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -520,7 +520,7 @@ export class RichText extends Component { this.lastEventCount = undefined; // force a refresh on the native side } - let minHeight = 0; + let minHeight = this.props.fontSize ? this.props.fontSize : styles[ 'editor-rich-text' ].minHeight; if ( style && style.minHeight ) { minHeight = style.minHeight; } diff --git a/packages/editor/src/components/rich-text/style.native.scss b/packages/editor/src/components/rich-text/style.native.scss index b1207a4338aa4a..b4d626a388bd2a 100644 --- a/packages/editor/src/components/rich-text/style.native.scss +++ b/packages/editor/src/components/rich-text/style.native.scss @@ -4,4 +4,5 @@ .editor-rich-text { font-family: $default-regular-font; text-decoration-color: $gray; + min-height: $min-height-paragraph; } From 21117decee30439ffb4e4dbf1d968e5e13e9a62e Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 8 Mar 2019 15:10:10 +0000 Subject: [PATCH 2/2] Only use the styles to set the min-height. --- packages/editor/src/components/rich-text/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index c241a0bc3246fa..92c6e9135b7ea8 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -520,7 +520,7 @@ export class RichText extends Component { this.lastEventCount = undefined; // force a refresh on the native side } - let minHeight = this.props.fontSize ? this.props.fontSize : styles[ 'editor-rich-text' ].minHeight; + let minHeight = styles[ 'editor-rich-text' ].minHeight; if ( style && style.minHeight ) { minHeight = style.minHeight; }