Opened 4 years ago

Last modified 4 years ago

#16137 new bug

kbd navigation fails with single item menu

Reported by: donn Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

PopUpMenu with 1 item can't be reached via up/down arrows.

Looks to me like Menu::_NextItem() will always return 0 in this case, because while(--numItems) is wrapped around its logic, and that loop runs 0 times. I think that's the whole problem.

If you'd like to see what this looks like, CharacterMap>Font>Noto Mono has a single item "Regular". If you kbd-navigate to that, Regular will be selected already, but if there's a way to make that happen with PopUpMenu, I don't know what it is.

Change History (1)

comment:1 by X512, 4 years ago

This is fixed in https://review.haiku-os.org/c/haiku/+/2284, but patch is not yet complete.

Note: See TracTickets for help on using tickets.