Skip to content

Commit

Permalink
[SSE] Fix Bug 72543
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Jan 16, 2025
1 parent 4b3e5b8 commit e7bee0b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/spreadsheeteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand All @@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e7bee0b

Please sign in to comment.