From dd2126a104e88764c902e67c1c2a4eb0c7fd5510 Mon Sep 17 00:00:00 2001 From: Kinbaum Date: Sat, 17 Jan 2026 13:08:08 -0500 Subject: [PATCH 1/2] fix: ignore the hotkey while focus is in an editable element by guarding the createShortcut callback --- packages/devtools/src/devtools.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/devtools/src/devtools.tsx b/packages/devtools/src/devtools.tsx index 5a68a04d..f87eb6ec 100644 --- a/packages/devtools/src/devtools.tsx +++ b/packages/devtools/src/devtools.tsx @@ -165,10 +165,21 @@ export default function DevTools() { } }) createEffect(() => { + const isEditableTarget = (element: Element | null) => { + if (!element || !(element instanceof HTMLElement)) return false + if (element.isContentEditable) return true + const tagName = element.tagName + if (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') { + return true + } + return element.getAttribute('role') === 'textbox' + } + const permutations = getHotkeyPermutations(settings().openHotkey) for (const permutation of permutations) { createShortcut(permutation, () => { + if (isEditableTarget(document.activeElement)) return toggleOpen() }) } From 183ad57f7348edb2e06763b244364c21b3fd0d83 Mon Sep 17 00:00:00 2001 From: Kinbaum Date: Sat, 17 Jan 2026 13:14:41 -0500 Subject: [PATCH 2/2] fix: enhance shortcut functionality by preventing activation in editable elements --- .changeset/hungry-donkeys-allow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/hungry-donkeys-allow.md diff --git a/.changeset/hungry-donkeys-allow.md b/.changeset/hungry-donkeys-allow.md new file mode 100644 index 00000000..bec576ed --- /dev/null +++ b/.changeset/hungry-donkeys-allow.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools': patch +--- + +Ignore the hotkey while focus is in an editable element by guarding the createShortcut callback