From c532f574c7df5e85a67243f06aab2c46763c66e9 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 5 Aug 2021 17:56:34 +0300 Subject: [PATCH 1/4] [DE PE mobile] Fix Bug 51538 --- .../common/mobile/lib/controller/ContextMenu.jsx | 16 +++++++++------- apps/documenteditor/mobile/src/page/main.jsx | 2 +- apps/presentationeditor/mobile/src/page/main.jsx | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/common/mobile/lib/controller/ContextMenu.jsx b/apps/common/mobile/lib/controller/ContextMenu.jsx index dd16ee1be..7a5b15c29 100644 --- a/apps/common/mobile/lib/controller/ContextMenu.jsx +++ b/apps/common/mobile/lib/controller/ContextMenu.jsx @@ -126,11 +126,13 @@ class ContextMenuController extends Component { onApiHideContextMenu() { if ( this.state.opened ) { - $$(idContextMenuElement).hide(); - f7.popover.close(idContextMenuElement, false); - - this.$targetEl.css({left: '-10000px', top: '-10000px'}); - this.setState({opened: false}); + setTimeout(() => { + $$(idContextMenuElement).hide(); + f7.popover.close(idContextMenuElement, false); + + this.$targetEl.css({left: '-10000px', top: '-10000px'}); + this.setState({opened: false}); + }, 800); } } @@ -150,8 +152,8 @@ class ContextMenuController extends Component { this.setState({openedMore: false}); } - onMenuItemClick(action) { - this.onApiHideContextMenu(); + async onMenuItemClick(action) { + await this.onApiHideContextMenu(); if (action === 'showActionSheet') { this.setState({openedMore: true}); diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 371c3fa27..ba64208dc 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -26,7 +26,7 @@ class MainPage extends Component { } handleClickToOpenOptions = (opts, showOpts) => { - ContextMenu.closeContextMenu(); + f7.popover.close('.document-menu.modal-in', false); setTimeout(() => { let opened = false; diff --git a/apps/presentationeditor/mobile/src/page/main.jsx b/apps/presentationeditor/mobile/src/page/main.jsx index 690cb6f4d..403e3b8f5 100644 --- a/apps/presentationeditor/mobile/src/page/main.jsx +++ b/apps/presentationeditor/mobile/src/page/main.jsx @@ -28,7 +28,7 @@ class MainPage extends Component { } handleClickToOpenOptions = (opts, showOpts) => { - ContextMenu.closeContextMenu(); + f7.popover.close('.document-menu.modal-in', false); setTimeout(() => { let opened = false; From 5a376cc3ebbc55c17d7dd6b0ad837c64ed6bd0fd Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 9 Aug 2021 16:32:28 +0300 Subject: [PATCH 2/4] [DE mobile] Fix Bug 49157 --- apps/common/mobile/lib/component/ThemeColorPalette.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/component/ThemeColorPalette.jsx b/apps/common/mobile/lib/component/ThemeColorPalette.jsx index ea46284f1..72d9063a8 100644 --- a/apps/common/mobile/lib/component/ThemeColorPalette.jsx +++ b/apps/common/mobile/lib/component/ThemeColorPalette.jsx @@ -11,7 +11,7 @@ const ThemeColors = ({ themeColors, onColorClick, curColor }) => { {row.map((effect, index) => { return( {onColorClick(effect.color, effect.effectId, effect.effectValue)}} > From 179aad0d22e9c9a8b3ece44344d4af0ba3619b52 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 9 Aug 2021 17:15:28 +0300 Subject: [PATCH 3/4] Removed timeout --- apps/common/mobile/lib/controller/ContextMenu.jsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/common/mobile/lib/controller/ContextMenu.jsx b/apps/common/mobile/lib/controller/ContextMenu.jsx index 7a5b15c29..8ddc3a61e 100644 --- a/apps/common/mobile/lib/controller/ContextMenu.jsx +++ b/apps/common/mobile/lib/controller/ContextMenu.jsx @@ -126,13 +126,11 @@ class ContextMenuController extends Component { onApiHideContextMenu() { if ( this.state.opened ) { - setTimeout(() => { - $$(idContextMenuElement).hide(); - f7.popover.close(idContextMenuElement, false); - - this.$targetEl.css({left: '-10000px', top: '-10000px'}); - this.setState({opened: false}); - }, 800); + $$(idContextMenuElement).hide(); + f7.popover.close(idContextMenuElement, false); + + this.$targetEl.css({left: '-10000px', top: '-10000px'}); + this.setState({opened: false}); } } From 46acf8489af4d5fd7f282ec9c8acff3db104460b Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 9 Aug 2021 17:42:18 +0300 Subject: [PATCH 4/4] [DE PE SSE mobile] Correct Search --- apps/documenteditor/mobile/src/controller/Search.jsx | 12 +++++------- .../mobile/src/controller/Search.jsx | 12 +++++------- .../mobile/src/controller/Search.jsx | 12 +++++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index 6c2a34f13..c3f8ae3f9 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -37,13 +37,11 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> - {isEdit ? - this.onFindReplaceClick('replace')} /> - : null} - {isEdit ? - this.onFindReplaceClick('replace-all')}> + {isEdit ? [ + this.onFindReplaceClick('replace')} />, + this.onFindReplaceClick('replace-all')}>] : null} diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx index 497d7a70b..b854ae12f 100644 --- a/apps/presentationeditor/mobile/src/controller/Search.jsx +++ b/apps/presentationeditor/mobile/src/controller/Search.jsx @@ -30,13 +30,11 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> - {isEdit ? - this.onFindReplaceClick('replace')} /> - : null} - {isEdit ? - this.onFindReplaceClick('replace-all')}> + {isEdit ? [ + this.onFindReplaceClick('replace')} />, + this.onFindReplaceClick('replace-all')}>] : null} diff --git a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx index f6949e9c6..f80e789fc 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx @@ -38,13 +38,11 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> - {isEdit ? - this.onFindReplaceClick('replace')} /> - : null} - {isEdit ? - this.onFindReplaceClick('replace-all')}> + {isEdit ? [ + this.onFindReplaceClick('replace')} />, + this.onFindReplaceClick('replace-all')}>] : null} {_t.textSearchIn}