From c5874e48ac0a6b21b2bc8ff7ff77791c07700232 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 23 Jun 2021 01:38:47 +0300 Subject: [PATCH] [PE mobile] Fix Bug 47072 --- .../mobile/src/controller/edit/EditText.jsx | 6 +++--- apps/presentationeditor/mobile/src/view/edit/EditText.jsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx index c81767977..46dae3c2a 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx @@ -134,11 +134,11 @@ class EditTextController extends Component { let size = curSize; if (isDecrement) { - typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size); + typeof size === 'undefined' || size == '' ? api.FontSizeOut() : size = Math.max(1, --size); } else { - typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(300, ++size); + typeof size === 'undefined' || size == '' ? api.FontSizeIn() : size = Math.min(300, ++size); } - if (typeof size !== 'undefined') { + if (typeof size !== 'undefined' || size == '') { api.put_TextPrFontSize(size); } }; diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index d7bd881f5..cb78c4800 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -15,7 +15,7 @@ const EditText = props => { const fontName = storeTextSettings.fontName || _t.textFonts; const fontSize = storeTextSettings.fontSize; const fontColor = storeTextSettings.textColor; - const displaySize = typeof fontSize === 'undefined' ? _t.textAuto : fontSize + ' ' + _t.textPt; + const displaySize = typeof fontSize === 'undefined' || fontSize == '' ? _t.textAuto : fontSize + ' ' + _t.textPt; const isBold = storeTextSettings.isBold; const isItalic = storeTextSettings.isItalic; const isUnderline = storeTextSettings.isUnderline; @@ -173,7 +173,7 @@ const PageFonts = props => { const _t = t('View.Edit', {returnObjects: true}); const storeTextSettings = props.storeTextSettings; const size = storeTextSettings.fontSize; - const displaySize = typeof size === 'undefined' ? _t.textAuto : size + ' ' + _t.textPt; + const displaySize = typeof size === 'undefined' || size == '' ? _t.textAuto : size + ' ' + _t.textPt; const curFontName = storeTextSettings.fontName; const fonts = storeTextSettings.fontsArray;