Skip to content

Commit

Permalink
fix(cc-kv-terminal): avoid keyboard interaction when command is running
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesoyres-cc committed Jan 27, 2025
1 parent 8483f66 commit 4fae15b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/cc-kv-terminal/cc-kv-terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export class CcKvTerminal extends LitElement {
_onShellPromptKeyDown(e) {
e.stopPropagation();

if (e.key === 'Enter') {
const isCommandRunning = this.state.type === 'running';

if (e.key === 'Enter' && !isCommandRunning) {
e.preventDefault();
this._cmdHistoryIndex = null;
const commandLine = e.target.value.trim();
Expand Down

0 comments on commit 4fae15b

Please sign in to comment.