From 07b6b9a868b146e11bb25e3f77846c7f534f20b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 16:10:58 +0000 Subject: [PATCH] Fix pitch input: stop editor keydown handler from intercepting input fields The edKeyDown handler was catching Backspace, Delete, arrow keys, and other keys globally, even when the user was typing in the pitch input field. This made it impossible to edit the pitch value (e.g. changing D4 to A4) because Backspace would delete the selected note instead of editing the text. Added a check to skip the handler when focus is on INPUT, TEXTAREA, or SELECT. https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX --- index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.html b/index.html index 23fe8a9..698f69e 100644 --- a/index.html +++ b/index.html @@ -5547,6 +5547,9 @@ function edWheel(e){ } function edKeyDown(e){ if(!document.getElementById("sed").classList.contains("active"))return; + // Don't intercept keys when user is typing in an input or select (e.g. pitch input) + var tag=document.activeElement&&document.activeElement.tagName; + if(tag==="INPUT"||tag==="TEXTAREA"||tag==="SELECT")return; // Ctrl+C — copy selected range or selected note if((e.ctrlKey||e.metaKey)&&e.key==="c"){