From 56d764608653d987885a2bd1bd7c3e5cb24ba9d9 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Sun, 5 Aug 2018 18:17:56 -0700 Subject: [PATCH] Lose menubar focus after leaf action --- src/views/menubar.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/menubar.rs b/src/views/menubar.rs index 6ab05b9..4811f0a 100644 --- a/src/views/menubar.rs +++ b/src/views/menubar.rs @@ -195,6 +195,8 @@ impl Menubar { fn select_child(&mut self, open_only: bool) -> EventResult { match self.root.children[self.focus] { MenuItem::Leaf(_, ref cb) if !open_only => { + // Go inactive after an action. + self.state = State::Inactive; EventResult::Consumed(Some(cb.clone())) } MenuItem::Subtree(_, ref tree) => {