From 3f097d5beed9f0fa0e97bc335a571f874ac3ad89 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 11 Aug 2021 12:28:33 +0300 Subject: [PATCH] [DE PE SSE] Fix Bug 51823 --- apps/documenteditor/mobile/src/controller/LongActions.jsx | 6 +++++- .../mobile/src/controller/LongActions.jsx | 6 +++++- .../mobile/src/controller/LongActions.jsx | 7 ++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index 7d5a4f200..f6e31b73d 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -64,7 +64,9 @@ const LongActionsController = () => { if (action && !forceClose) { setLongActionView(action); } else { - loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') && f7.dialog.close(loadMask.el); + loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') ? + f7.dialog.close(loadMask.el) : + f7.dialog.close($$('.dialog-preloader')); } }; @@ -171,6 +173,8 @@ const LongActionsController = () => { if (loadMask && loadMask.el && loadMask.el.classList.contains('modal-in')) { loadMask.el.getElementsByClassName('dialog-title')[0].innerHTML = title; + } else if ($$('.dialog-preloader').hasClass('modal-in')) { + $$('.dialog-preloader').find('dialog-title').text(title); } else { loadMask = f7.dialog.preloader(title); } diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index 4ef67ab68..8ce54677f 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -64,7 +64,9 @@ const LongActionsController = () => { if (action && !forceClose) { setLongActionView(action) } else { - loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') && f7.dialog.close(loadMask.el); + loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') ? + f7.dialog.close(loadMask.el) : + f7.dialog.close($$('.dialog-preloader')); } }; @@ -161,6 +163,8 @@ const LongActionsController = () => { if (loadMask && loadMask.el && loadMask.el.classList.contains('modal-in')) { loadMask.el.getElementsByClassName('dialog-title')[0].innerHTML = title; + } else if ($$('.dialog-preloader').hasClass('modal-in')) { + $$('.dialog-preloader').find('dialog-title').text(title); } else { loadMask = f7.dialog.preloader(title); } diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index adba817b8..34d2f7d8f 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -66,7 +66,9 @@ const LongActionsController = () => { if (action && !forceClose) { setLongActionView(action) } else { - loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') && f7.dialog.close(loadMask.el); + loadMask && loadMask.el && loadMask.el.classList.contains('modal-in') ? + f7.dialog.close(loadMask.el) : + f7.dialog.close($$('.dialog-preloader')); } }; @@ -167,8 +169,11 @@ const LongActionsController = () => { } if (action.type == Asc.c_oAscAsyncActionType.BlockInteraction) { + if (loadMask && loadMask.el && loadMask.el.classList.contains('modal-in')) { loadMask.el.getElementsByClassName('dialog-title')[0].innerHTML = title; + } else if ($$('.dialog-preloader').hasClass('modal-in')) { + $$('.dialog-preloader').find('dialog-title').text(title); } else { loadMask = f7.dialog.preloader(title); }