Navigation: review r3 fix
This commit is contained in:
4 files changed
+48
-1
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user