Skip to content

Commit

Permalink
Close #202. Keep focus on the selected widget when a modal is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Jun 13, 2018
1 parent 154cb3e commit c8b22eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wtf/focus_tracker.go
Expand Up @@ -36,6 +36,10 @@ func (tracker *FocusTracker) Next() {

// None removes focus from the currently-focused widget.
func (tracker *FocusTracker) None() {
if tracker.focusState() == NonWidget {
return
}

tracker.blur(tracker.Idx)
}

Expand Down

1 comment on commit c8b22eb

@joniler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix! Works a charm!

Please sign in to comment.