From ea78f7fede46d795a4c04d00948aab59cd2888ee Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 21 Apr 2023 11:00:03 +0100 Subject: [PATCH] Prevent immediately cell mutation by typing for readonly cells --- .../src/components/grid/overlays/KeyboardManager.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte index dc3ee691ec..4e82438b07 100644 --- a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte +++ b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte @@ -158,7 +158,7 @@ // Focuses the cell and starts entering a new value const startEnteringValue = (key, keyCode) => { - if ($focusedCellAPI) { + if ($focusedCellAPI && !$focusedCellAPI.isReadonly()) { const type = $focusedCellAPI.getType() if (type === "number" && keyCodeIsNumber(keyCode)) { $focusedCellAPI.setValue(parseInt(key))