diff --git a/src/components/CalculatorPopover.tsx b/src/components/CalculatorPopover.tsx index 73d5fca..6ad3d2f 100644 --- a/src/components/CalculatorPopover.tsx +++ b/src/components/CalculatorPopover.tsx @@ -114,6 +114,14 @@ const CalculatorPopover: Component = () => { const handleKeyDown = (e: KeyboardEvent) => { if (!isOpen()) return; + // Don't intercept if an input is focused + const activeElement = document.activeElement; + const isInputFocused = activeElement instanceof HTMLInputElement || + activeElement instanceof HTMLTextAreaElement || + activeElement?.hasAttribute('contenteditable'); + + if (isInputFocused) return; + if (e.key >= '0' && e.key <= '9') { handleNumberClick(e.key); } else if (e.key === '.') {