Skip to content

Commit

Permalink
call focus instead of delegating
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeletier committed May 24, 2020
1 parent b94fc08 commit b25cc10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions window.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ func (w *Window) Center() *Window {
// Focus is called when this primitive receives focus.
func (w *Window) Focus(delegate func(p tview.Primitive)) {
if w.root != nil {
delegate(w.root)
//delegate(w.root)
w.root.Focus(delegate)
} else {
delegate(w.Box)
w.Box.Focus(delegate)
}
}

Expand Down

0 comments on commit b25cc10

Please sign in to comment.