fix: abort copy styles action when pressing esc

This commit is contained in:
Daniel
2025-12-06 23:41:00 +01:00
parent f96612cf23
commit 95d46c84a6

View File

@@ -322,6 +322,11 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
}, },
onEscape: (): void => { onEscape: (): void => {
workbookState.clearCutRange(); workbookState.clearCutRange();
workbookState.setCopyStyles(null);
const el = rootRef.current?.getElementsByClassName("sheet-container")[0];
if (el) {
(el as HTMLElement).style.cursor = "auto";
}
setRedrawId((id) => id + 1); setRedrawId((id) => id + 1);
}, },
onSelectColumn: (): void => { onSelectColumn: (): void => {