From 95d46c84a6607140dacc05f34728ece745ebceea Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 6 Dec 2025 23:41:00 +0100 Subject: [PATCH] fix: abort copy styles action when pressing esc --- webapp/IronCalc/src/components/Workbook/Workbook.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp/IronCalc/src/components/Workbook/Workbook.tsx b/webapp/IronCalc/src/components/Workbook/Workbook.tsx index aa8e0b9..5f979f2 100644 --- a/webapp/IronCalc/src/components/Workbook/Workbook.tsx +++ b/webapp/IronCalc/src/components/Workbook/Workbook.tsx @@ -322,6 +322,11 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => { }, onEscape: (): void => { 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); }, onSelectColumn: (): void => {