Merge pull request #1452 from ONLYOFFICE/feature/bugfix-for-release-7-0

Feature/bugfix for release 7 0
This commit is contained in:
catbasilio 2021-12-29 14:11:04 +03:00 committed by GitHub
commit 711066e6d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -516,15 +516,18 @@ const EditShape = props => {
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let controlProps = api && api.asc_IsContentControl() ? api.asc_GetContentControlProperties() : null,
fixedSize = false;
const inControl = api.asc_IsContentControl();
const controlProps = (api && inControl) ? api.asc_GetContentControlProperties() : null;
const lockType = controlProps ? controlProps.get_Lock() : Asc.c_oAscSdtLockType.Unlocked;
let fixedSize = false;
if (controlProps) {
let spectype = controlProps.get_SpecificType();
fixedSize = (spectype == Asc.c_oAscContentControlSpecificType.CheckBox || spectype == Asc. c_oAscContentControlSpecificType.ComboBox || spectype == Asc.c_oAscContentControlSpecificType.DropDownList || spectype == Asc.c_oAscContentControlSpecificType.None || spectype == Asc.c_oAscContentControlSpecificType.Picture) && controlProps.get_FormPr() && controlProps.get_FormPr().get_Fixed();
}
let disableRemove = !!props.storeFocusObjects.paragraphObject;
let disableRemove = !!props.storeFocusObjects.paragraphObject || (lockType == Asc.c_oAscSdtLockType.SdtContentLocked || lockType == Asc.c_oAscSdtLockType.SdtLocked);
return (
<Fragment>

View file

@ -398,11 +398,18 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onEditCell', (state) => {
if (state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) {
const isEditCell = state === Asc.c_oAscCellEditorState.editStart;
const isEditEnd = state === Asc.c_oAscCellEditorState.editEnd;
if (storeFocusObjects.isEditCell !== isEditCell) {
storeFocusObjects.setEditCell(isEditCell);
}
if(isEditEnd) {
storeFocusObjects.setEditFormulaMode(false);
}
} else {
const isFormula = state === Asc.c_oAscCellEditorState.editFormula;
if (storeFocusObjects.editFormulaMode !== isFormula) {
storeFocusObjects.setEditFormulaMode(isFormula);
}