From 3e015bf13a1b57ce7b1ae0a4a04a39c1bc8d9e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Mon, 2 Jun 2025 20:49:43 +0200 Subject: [PATCH] FIX: control+shitf selects area --- .../IronCalc/src/components/Worksheet/usePointer.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/webapp/IronCalc/src/components/Worksheet/usePointer.ts b/webapp/IronCalc/src/components/Worksheet/usePointer.ts index 832cb7e..8b37722 100644 --- a/webapp/IronCalc/src/components/Worksheet/usePointer.ts +++ b/webapp/IronCalc/src/components/Worksheet/usePointer.ts @@ -236,9 +236,16 @@ const usePointer = (options: PointerSettings): PointerEvents => { ); // we continue to select the new cell } - options.onCellSelected(cell, event); - isSelecting.current = true; - worksheetWrapper.setPointerCapture(event.pointerId); + if (event.shiftKey) { + // We are extending the selection + options.onAreaSelecting(cell); + options.onAreaSelected(); + } else { + // We are selecting a single cell + options.onCellSelected(cell, event); + isSelecting.current = true; + worksheetWrapper.setPointerCapture(event.pointerId); + } } }, [options],