Skip to content

Commit ca43354

Browse files
committed
fix(code): fix input bleeding between command center tasks
1 parent fb78920 commit ca43354

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/code/src/renderer/components/action-selector/ActionSelector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export function ActionSelector({
118118
if (showInlineEdit || document.activeElement?.tagName === "TEXTAREA")
119119
return;
120120

121+
const container = containerRef.current;
122+
if (container && !container.contains(document.activeElement)) return;
123+
121124
switch (e.key) {
122125
case "ArrowUp":
123126
e.preventDefault();
@@ -186,7 +189,7 @@ export function ActionSelector({
186189
document.addEventListener("keydown", handler, { capture: true });
187190
return () =>
188191
document.removeEventListener("keydown", handler, { capture: true });
189-
}, []);
192+
}, [containerRef.current]);
190193

191194
const getSubmitLabel = () => {
192195
return hasSteps && activeStep < numSteps - 1 ? "Next" : "Submit";

0 commit comments

Comments
 (0)