Calculator keystroke fixes

This commit is contained in:
2026-03-18 17:21:50 -05:00
parent a1ca82e539
commit aac836501e
+8
View File
@@ -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 === '.') {