From 37e1834091686f4621106f0c3702915a83c9ca8f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 8 May 2020 21:48:46 +0300 Subject: [PATCH] Fix Bug 45283, Bug 25773 --- apps/documenteditor/main/app/controller/Main.js | 8 +++++--- apps/presentationeditor/main/app/controller/Main.js | 8 +++++--- apps/spreadsheeteditor/main/app/controller/Main.js | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 8a4845511..4a093b4c0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1620,10 +1620,12 @@ define([ }, this); } - if (id !== Asc.c_oAscError.ID.ForceSaveTimeout) - Common.UI.alert(config); + if (id !== Asc.c_oAscError.ID.ForceSaveTimeout) { + if (!Common.Utils.ModalWindow.isVisible() || $('.asc-window.modal.alert[data-value=' + id + ']').length<1) + Common.UI.alert(config).$window.attr('data-value', id); + } - Common.component.Analytics.trackEvent('Internal Error', id.toString()); + (id!==undefined) && Common.component.Analytics.trackEvent('Internal Error', id.toString()); }, onCoAuthoringDisconnect: function() { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 7342c5086..ca3c069e6 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1290,10 +1290,12 @@ define([ }, this); } - if (id !== Asc.c_oAscError.ID.ForceSaveTimeout) - Common.UI.alert(config); + if (id !== Asc.c_oAscError.ID.ForceSaveTimeout) { + if (!Common.Utils.ModalWindow.isVisible() || $('.asc-window.modal.alert[data-value=' + id + ']').length<1) + Common.UI.alert(config).$window.attr('data-value', id); + } - Common.component.Analytics.trackEvent('Internal Error', id.toString()); + (id!==undefined) && Common.component.Analytics.trackEvent('Internal Error', id.toString()); }, onCoAuthoringDisconnect: function() { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index b8cfa1499..267225973 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1532,10 +1532,12 @@ define([ }, this); } - if (id == Asc.c_oAscError.ID.EditingError || $('.asc-window.modal.alert:visible').length < 1 && (id !== Asc.c_oAscError.ID.ForceSaveTimeout)) { - Common.UI.alert(config); - (id!==undefined) && Common.component.Analytics.trackEvent('Internal Error', id.toString()); + if (id !== Asc.c_oAscError.ID.ForceSaveTimeout) { + if (!Common.Utils.ModalWindow.isVisible() || $('.asc-window.modal.alert[data-value=' + id + ']').length<1) + Common.UI.alert(config).$window.attr('data-value', id); } + + (id!==undefined) && Common.component.Analytics.trackEvent('Internal Error', id.toString()); }, onCoAuthoringDisconnect: function() {