From dd2126a104e88764c902e67c1c2a4eb0c7fd5510 Mon Sep 17 00:00:00 2001 From: Kinbaum Date: Sat, 17 Jan 2026 13:08:08 -0500 Subject: [PATCH 1/3] 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/3] 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 From 83e4351a6bc9031a43290ded69f2dab22f8acf90 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 08:50:18 +0000 Subject: [PATCH 3/3] ci: apply automated fixes --- packages/devtools/src/devtools.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/devtools/src/devtools.tsx b/packages/devtools/src/devtools.tsx index f87eb6ec..64f38065 100644 --- a/packages/devtools/src/devtools.tsx +++ b/packages/devtools/src/devtools.tsx @@ -169,7 +169,11 @@ export default function DevTools() { if (!element || !(element instanceof HTMLElement)) return false if (element.isContentEditable) return true const tagName = element.tagName - if (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') { + if ( + tagName === 'INPUT' || + tagName === 'TEXTAREA' || + tagName === 'SELECT' + ) { return true } return element.getAttribute('role') === 'textbox'