From c11b0c102da0d74f0c3c4fa96f1cfd0c01515c19 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 10 Aug 2022 17:51:32 +0300 Subject: [PATCH] Fix Bug 58328 --- apps/common/main/lib/controller/ExternalOleEditor.js | 5 ++++- apps/spreadsheeteditor/main/app/controller/Main.js | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/controller/ExternalOleEditor.js b/apps/common/main/lib/controller/ExternalOleEditor.js index 2b305000e..2345dc754 100644 --- a/apps/common/main/lib/controller/ExternalOleEditor.js +++ b/apps/common/main/lib/controller/ExternalOleEditor.js @@ -199,13 +199,16 @@ define([ if (this.oleEditorView) { if (eventData.type == 'documentReady') { this.oleEditorView._isExternalDocReady = true; - this.oleEditorView.setControlsDisabled(false); this.isExternalEditorVisible && (isAppFirstOpened = false); this.oleEditorView._oleData && this.setOleData(); if (this.needDisableEditing) { this.onOleEditingDisabled(); } } else + if (eventData.type == 'oleEditorReady') { + if (this.needDisableEditing===undefined) + this.oleEditorView.setControlsDisabled(false); + } else if (eventData.type == "shortcut") { if (eventData.data.key == 'escape') this.oleEditorView.hide(); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 1e859e3dd..910242136 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -208,6 +208,7 @@ define([ this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this)); this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this)); this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this)); + this.api.asc_registerCallback('asc_onOleEditorReady', _.bind(this.onOleEditorReady, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this)); @@ -2643,6 +2644,10 @@ define([ } }, + onOleEditorReady: function() { + Common.Gateway.internalMessage('oleEditorReady', {}); + }, + setMergeData: function(merge) { if (typeof merge === 'object' && this.api) { this.api.asc_setData(merge);