@@ -172,10 +172,18 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
172172 }
173173 return p, nil
174174 case tea.MouseClickMsg:
175+ if p.isMouseOverChat(msg.X, msg.Y) {
176+ p.focusedPane = PanelTypeChat
177+ p.chat.Focus()
178+ p.editor.Blur()
179+ } else {
180+ p.focusedPane = PanelTypeEditor
181+ p.editor.Focus()
182+ p.chat.Blur()
183+ }
175184 u, cmd := p.chat.Update(msg)
176185 p.chat = u.(chat.MessageListCmp)
177186 return p, cmd
178− return p, nil
179187 case tea.MouseMotionMsg:
180188 if msg.Button == tea.MouseLeft {
181189 u, cmd := p.chat.Update(msg)