From e7bee0b2e32127c057b8be142547da4d054d5282 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 16 Jan 2025 18:50:04 +0300 Subject: [PATCH] [SSE] Fix Bug 72543 --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 63d0ecf3a5..1cdaed9b0b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2583,6 +2583,10 @@ define([ }, onApiEditCell: function(state) { + this.onEditCell(state); + }, + + onEditCell: function(state, keepState) { if ($('.asc-window.enable-key-events:visible').length>0) return; var toolbar = this.toolbar; @@ -2595,7 +2599,7 @@ define([ toolbar.lockToolbar(Common.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {array: [toolbar.cmbNumberFormat, toolbar.btnWrap, toolbar.btnMerge, toolbar.btnBackColor, toolbar.btnBorders, toolbar.btnTableTemplate, toolbar.btnHorizontalAlign, toolbar.btnVerticalAlign], merge: true, - clear: [Common.enumLock.editFormula, Common.enumLock.editText]}); + clear: !keepState ? [Common.enumLock.editFormula, Common.enumLock.editText] : undefined}); (is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l') : Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l'); } else { @@ -2618,7 +2622,7 @@ define([ toolbar.btnNamedRange.menu.items[1] ].concat(toolbar.itemsNamedRange), merge: true, - clear: [Common.enumLock.editFormula, Common.enumLock.editText] + clear: !keepState ? [Common.enumLock.editFormula, Common.enumLock.editText] : undefined }); var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h'; @@ -4456,7 +4460,7 @@ define([ onCellsRange: function(status) { this.api.isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None); - this.onApiEditCell(this.api.isRangeSelection ? Asc.c_oAscCellEditorState.editStart : Asc.c_oAscCellEditorState.editEnd); + this.onEditCell(this.api.isRangeSelection || this.api.isCellEdited ? Asc.c_oAscCellEditorState.editStart : Asc.c_oAscCellEditorState.editEnd, true); var toolbar = this.toolbar; toolbar.lockToolbar(Common.enumLock.selRangeEdit, this.api.isRangeSelection);