From 81e96f14018382d71c5dd9eb30a792a06c22b203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Sat, 13 Sep 2025 16:46:36 +0200 Subject: [PATCH] FIX: Shift+Letter starts editing cell --- .../Workbook/useKeyboardNavigation.ts | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/webapp/IronCalc/src/components/Workbook/useKeyboardNavigation.ts b/webapp/IronCalc/src/components/Workbook/useKeyboardNavigation.ts index b4004d9..d9be64f 100644 --- a/webapp/IronCalc/src/components/Workbook/useKeyboardNavigation.ts +++ b/webapp/IronCalc/src/components/Workbook/useKeyboardNavigation.ts @@ -178,7 +178,6 @@ const useKeyboardNavigation = ( break; } } - return; } if (isAlt && !isCtrl && !isShift) { // Alt+... @@ -200,20 +199,24 @@ const useKeyboardNavigation = ( } return; } - // At this point we know that no modifier keys are pressed - if (isCtrl || isShift || isAlt) { - // If any modifier key is pressed, we do not handle the key + if (isCtrl || isAlt) { + // Other combinations with Ctrl or Alt are not handled return; } - if (key === "F2") { - options.onCellEditStart(); + + if (isEditingKey(key) || key === "Backspace") { + const initText = key === "Backspace" ? "" : key; + options.onEditKeyPressStart(initText); event.stopPropagation(); event.preventDefault(); return; } - if (isEditingKey(key) || key === "Backspace") { - const initText = key === "Backspace" ? "" : key; - options.onEditKeyPressStart(initText); + if (isShift) { + // Other combinations with Shift are not handled + return; + } + if (key === "F2") { + options.onCellEditStart(); event.stopPropagation(); event.preventDefault(); return;