tycono 0.3.34 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -342,9 +342,9 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
342
342
|
const acVisible = acOpen && acCandidates.length > 0;
|
|
343
343
|
|
|
344
344
|
// Quick bar + autocomplete navigation
|
|
345
|
+
// isActive option: when false, useInput completely deregisters the handler
|
|
346
|
+
// This prevents CommandMode from stealing key events while Panel is active
|
|
345
347
|
useInput((ch, key) => {
|
|
346
|
-
// Don't handle input when hidden (Panel mode active) — prevents key event stealing
|
|
347
|
-
if (!isActive) return;
|
|
348
348
|
|
|
349
349
|
// Autocomplete mode
|
|
350
350
|
if (acVisible) {
|
|
@@ -402,7 +402,7 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
402
402
|
setQuickBarIndex(0);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
});
|
|
405
|
+
}, { isActive });
|
|
406
406
|
|
|
407
407
|
const handleSubmit = useCallback((value: string) => {
|
|
408
408
|
const trimmed = value.trim();
|
|
@@ -466,7 +466,7 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
466
466
|
onChange={(v) => { setInput(v); setAcIndex(0); }}
|
|
467
467
|
onSubmit={handleSubmit}
|
|
468
468
|
placeholder=""
|
|
469
|
-
focus={!quickBarActive}
|
|
469
|
+
focus={isActive && !quickBarActive}
|
|
470
470
|
/>
|
|
471
471
|
</Box>
|
|
472
472
|
|