[SSE] Lock comments when selected not a cell for comment editor

This commit is contained in:
Alexei Koshelev 2022-10-24 18:49:15 +03:00
parent db8816c05f
commit e9b04b91fb

View file

@ -2882,7 +2882,6 @@ define([
// info.asc_getComments()===null - has comment, but no permissions to view it
toolbar.lockToolbar(Common.enumLock.commentLock,
(selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked())
|| this.toolbar.mode.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells)
|| selectionType != Asc.c_oAscSelectionType.RangeCells,
{ array: this.btnsComment });
@ -3249,9 +3248,10 @@ define([
if (!this.appConfig.isRestrictedEdit) return;
var selectionType = info.asc_getSelectionType();
this.toolbar.lockToolbar(Common.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked()) ||
this.appConfig && this.appConfig.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells),
{ array: this.btnsComment });
this.toolbar.lockToolbar(Common.enumLock.commentLock,
(selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked())
|| selectionType != Asc.c_oAscSelectionType.RangeCells,
{ array: this.btnsComment });
this.toolbar.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], { array: this.btnsComment });
},