Skip to content

Commit

Permalink
Merge pull request #144 from jpinkney-aws/jpinkney-aws/fix-focus
Browse files Browse the repository at this point in the history
fix: only re-focus after a response stream if the window is active
  • Loading branch information
dogusata authored Oct 21, 2024
2 parents 0484a26 + d04b76e commit 06807e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/chat-item/prompt-input/prompt-text-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class PromptTextInput {
} else {
// Enable the input field and focus on it
this.promptTextInput.removeAttribute('disabled');
if (Config.getInstance().config.autoFocus) {
if (Config.getInstance().config.autoFocus && document.hasFocus()) {
this.promptTextInput.focus();
}
}
Expand Down

0 comments on commit 06807e0

Please sign in to comment.