Navigation: review r3 fix

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:15:17 -04:00
1 parent 529aea6fa4
commit 7e4d862c12
4 files changed
+48 -1

No files matched your search

+8
View File
@@ -105,9 +105,17 @@ func Menubar(c *ui.Context, menus []MenubarMenu, opts MenubarOptions) MenubarRes
titles[i] = t.Bounds()
}
})
if m.st.open >= 0 && bar.Shortcut(0, ui.KeyEscape) {
m.close()
}
if m.st.open >= 0 {
m.overlay(titles)
}
// Presses in the menu refocus the title, so lost focus means Tab left the menubar.
if m.st.open >= 0 && m.st.focusTo < 0 && !bar.FocusWithin() {
slog.Debug("mujica: menubar close on focus out")
m.st.open, m.st.hl = -1, nil
}
// Focus stays on the title, so the highlighted item is read out.
if name := m.current(); m.moved && name != "" {
c.Announce(name)