From 810588e2e67ec5aa62551bbd151dda8454aab18f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 19 Jul 2018 12:39:52 +0300 Subject: [PATCH] Fix comment mode --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 5f4075f1f..f927a6ea4 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -664,7 +664,7 @@ define([ action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); action ? this.setLongActionView(action) : this.loadMask && this.loadMask.hide(); - if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2 || + if (this.appOptions.isEdit && (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2 || this.getApplication().getController('Common.Controllers.ReviewChanges').isPreviewChangesMode())) this.synchronizeChanges(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 2107e270f..fce4ff006 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -465,7 +465,7 @@ define([ action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); action ? this.setLongActionView(action) : this.loadMask && this.loadMask.hide(); - if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2)) + if (this.appOptions.isEdit && (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2)) this.synchronizeChanges(); if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl))) { diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index b87216772..5ea0780b0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1686,7 +1686,7 @@ define([ onApiZoomChange: function(zf, type){}, onApiSheetChanged: function() { - if (!this.toolbar.mode.isEdit) return; + if (!this.toolbar.mode || !this.toolbar.mode.isEdit) return; var props = this.api.asc_getPageOptions(this.api.asc_getActiveWorksheetIndex()), opt = props.asc_getPageSetup();