fixed BorderLayout consumes all key events
This commit is contained in:
parent
9a2c61d953
commit
66605df473
@ -139,7 +139,7 @@ func (g *BorderLayout) Layout() (prefWidth, prefHeight int) {
|
|||||||
|
|
||||||
func (g *BorderLayout) OnKeyPressed(event *tui.KeyEvent) (consumed bool) {
|
func (g *BorderLayout) OnKeyPressed(event *tui.KeyEvent) (consumed bool) {
|
||||||
for _, view := range g.Views() {
|
for _, view := range g.Views() {
|
||||||
if view.OnKeyPressed(event) {
|
if consumed := view.OnKeyPressed(event); consumed {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user