fix(sheet): fix change selection with tab or enter (#621)

close #366
This commit is contained in:
Wenzhao Hu
2023-12-04 14:13:58 +08:00
committed by GitHub
parent 033701a681
commit cb09fc0b72
@@ -106,7 +106,7 @@ export interface IMoveSelectionEnterAndTabCommandParams {
}
/**
* Move selection for enter and tab
* Move selection for enter and tab.
*/
export const MoveSelectionEnterAndTabCommand: ICommand<IMoveSelectionEnterAndTabCommandParams> = {
id: 'sheet.command.move-selection-enter-tab',
@@ -138,14 +138,7 @@ export const MoveSelectionEnterAndTabCommand: ICommand<IMoveSelectionEnterAndTab
let resultRange;
const { startRow, endRow, startColumn, endColumn } = range;
if (
!(
startRow === primary.startRow &&
endRow === primary.startRow &&
startColumn === primary.startColumn &&
endColumn === primary.endColumn
)
) {
if (!Rectangle.equals(range, primary)) {
// Handle the situation of moving the active cell within the selection area.
shortcutExperienceService.remove({
unitId,