Skip to content

Commit

Permalink
Focus input when clicking in a chat, on a non focussable element
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Jan 7, 2025
1 parent 8c61222 commit f47ed40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/jupyter-chat/src/widgets/chat-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ export class ChatWidget extends ReactWidget {
constructor(options: Chat.IOptions) {
super();

this.id = 'jupyter-chat::widget';
this.title.icon = chatIcon;
this.title.caption = 'Jupyter Chat'; // TODO: i18n

this._chatOptions = options;
this.id = `jupyter-chat::widget::${options.model.name}`;
this.node.onclick = () => this.model.focusInput();
}

/**
Expand Down

0 comments on commit f47ed40

Please sign in to comment.