diff options
Diffstat (limited to 'ui/view-main.go')
-rw-r--r-- | ui/view-main.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/view-main.go b/ui/view-main.go index d081d13..d36a510 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -90,6 +90,8 @@ func (view *MainView) ShowModal(modal mauview.Component) { view.focused, ok = modal.(mauview.Focusable) if !ok { view.focused = nil + } else { + view.focused.Focus() } } @@ -281,6 +283,9 @@ defaultHandler: const WheelScrollOffsetDiff = 3 func (view *MainView) OnMouseEvent(event mauview.MouseEvent) bool { + if view.modal != nil { + return view.modal.OnMouseEvent(event) + } if view.config.Preferences.HideRoomList { return view.roomView.OnMouseEvent(event) } |