aboutsummaryrefslogtreecommitdiff
path: root/ui/view-main.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-03-28 23:28:27 +0200
committerTulir Asokan <tulir@maunium.net>2019-03-28 23:28:27 +0200
commit1b1cabb360538e03fd72092eb0e2cb25edb633f8 (patch)
treec8d46c5e3cd2bd39708375db566e5882fd4548a2 /ui/view-main.go
parent6a3017888fa0d2cdea581b99b5521b10b9312716 (diff)
Even more changes
Diffstat (limited to 'ui/view-main.go')
-rw-r--r--ui/view-main.go5
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)
}