cascade events to root view in CloseOnKeyPressed

This commit is contained in:
milarin 2023-04-24 14:15:33 +02:00
parent a9f9a2e38d
commit 0af1f0fde6

View File

@ -129,6 +129,11 @@ func CloseOnKeyPressed(screen *Screen, key tcell.Key) func(event *KeyEvent) (con
screen.Stop()
return true
}
if screen.Root != nil {
return screen.Root.OnKeyPressed(event)
}
return false
}
}