From 8fbae1880845af03f80e8a7463cc106d345938b6 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 7 Aug 2019 16:13:12 +0300 Subject: [PATCH] [SSE mobile] Fix bug with modal overlay --- .../mobile/app/controller/Settings.js | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index f9fc62925..878e9affb 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -200,6 +200,7 @@ define([ }); }).on('close', function () { $overlay.off('removeClass'); + $overlay.removeClass('modal-overlay-visible'); }); } @@ -670,20 +671,24 @@ define([ var me = this, format = $(e.currentTarget).data('format'); + me.hideModal(); + if (format) { if (format == Asc.c_oAscFileType.CSV) { - uiApp.confirm( - me.warnDownloadAs, - me.notcriticalErrorTitle, - function () { - Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); - } - ); + setTimeout(function () { + uiApp.confirm( + me.warnDownloadAs, + me.notcriticalErrorTitle, + function () { + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); + } + ); + }, 50); } else { - me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); + setTimeout(function () { + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); + }, 50); } - - me.hideModal(); } },