Merge pull request #1893 from ONLYOFFICE/fix/bugfix

Fix Bug 58328
This commit is contained in:
Julia Radzhabova 2022-08-10 18:02:56 +03:00 committed by GitHub
commit f07a4ec7fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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();

View file

@ -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);