From 49078c01a649862ff2c3d99c042ec7f4eb42b743 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 26 Aug 2019 16:48:10 +0300 Subject: [PATCH] Fix Bug 37251 --- .../main/app/controller/DocumentHolder.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 18f1a82d5..55f341fba 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -134,11 +134,14 @@ define([ } }, this)); diagramEditor.on('hide', _.bind(function(cmp, message) { - this.documentHolder.fireEvent('editcomplete', this.documentHolder); if (this.api) { this.api.asc_onCloseChartFrame(); this.api.asc_enableKeyEvents(true); } + var me = this; + setTimeout(function(){ + me.documentHolder.fireEvent('editcomplete', me.documentHolder); + }, 10); }, this)); } @@ -151,10 +154,13 @@ define([ this.api.asc_setMailMergeData(data); }, this)); mergeEditor.on('hide', _.bind(function(cmp, message) { - this.documentHolder.fireEvent('editcomplete', this.documentHolder); if (this.api) { this.api.asc_enableKeyEvents(true); } + var me = this; + setTimeout(function(){ + me.documentHolder.fireEvent('editcomplete', me.documentHolder); + }, 10); }, this)); } },