@@ -497,6 +497,11 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
497497 case copyChatHighlightMsg:
498498 cmds = append(cmds, m.copyChatHighlight())
499499 case tea.MouseClickMsg:
500+ // Pass mouse events to dialogs first if any are open.
501+ if m.dialog.HasDialogs() {
502+ m.dialog.Update(msg)
503+ return m, tea.Batch(cmds...)
504+ }
500505 switch m.state {
501506 case uiChat:
502507 x, y := msg.X, msg.Y
@@ -509,6 +514,12 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
509514 }
510515
511516 case tea.MouseMotionMsg:
517+ // Pass mouse events to dialogs first if any are open.
518+ if m.dialog.HasDialogs() {
519+ m.dialog.Update(msg)
520+ return m, tea.Batch(cmds...)
521+ }
522+
512523 switch m.state {
513524 case uiChat:
514525 if msg.Y <= 0 {
@@ -541,6 +552,11 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
541552 }
542553
543554 case tea.MouseReleaseMsg:
555+ // Pass mouse events to dialogs first if any are open.
556+ if m.dialog.HasDialogs() {
557+ m.dialog.Update(msg)
558+ return m, tea.Batch(cmds...)
559+ }
544560 const doubleClickThreshold = 500 * time.Millisecond
545561
546562 switch m.state {