fixed BorderLayout consumes all key events

This commit is contained in:
milarin 2023-04-24 14:22:54 +02:00
parent 9a2c61d953
commit 66605df473

View File

@ -139,7 +139,7 @@ func (g *BorderLayout) Layout() (prefWidth, prefHeight int) {
func (g *BorderLayout) OnKeyPressed(event *tui.KeyEvent) (consumed bool) {
for _, view := range g.Views() {
if view.OnKeyPressed(event) {
if consumed := view.OnKeyPressed(event); consumed {
return true
}
}